/* ==========================================================================
   Cassiopeia HealthBy — user.css
   Кастомные стили поверх Joomla Cassiopeia + Bootstrap 5
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS-переменные
   -------------------------------------------------------------------------- */
:root {
    /* Фирменные цвета Cassiopeia */
    --cassiopeia-color-primary: #2d917f;
    --cassiopeia-color-hover:   #f75815;
    --cassiopeia-color-link:    blue;

    /* Основная палитра */
    --primary-blue:   #2C5AA0;
    --primary-green:  #2d917f;
    --accent-orange:  #FF9800;

    /* Фоны и текст */
    --body-bg:        #f8fafc;
    --light-bg:       #f8fafc;
    --card-bg:        #ffffff;
    --surface-color:  #ffffff;

    --text-dark:      #1e293b;
    --text-gray:      #64748b;
    --text-light:     #94a3b8;

    --default-color:  #212529;
    --heading-color:  #2d465e;

    --border:         #e2e8f0;

    /* Акценты */
    --accent-color:      #f75815;
    --link-hover-color:  #f75815;
    --contrast-color:    #ffffff;

    /* Тени */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.07);

    --radius: 12px;
}

/* --------------------------------------------------------------------------
   2. Базовые правила
   -------------------------------------------------------------------------- */
.row {
    width: 100%;
    margin: auto;
}

.container-component > :first-child {
    margin: 0 auto;
}

/* Кнопки */
.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--cassiopeia-color-hover);
    border-color: var(--cassiopeia-color-hover);
}

/* Заголовки */
h2, .h2 {
    font-size: 1.7rem;
    color: var(--cassiopeia-color-primary);
}

h3, .h3 {
    font-size: 1.7rem;
    color: var(--cassiopeia-color-primary);
}

@media (width >= 1200px) {
    h1, .h1 { font-size: 2rem; }
}

/* --------------------------------------------------------------------------
   3. Хедер
   -------------------------------------------------------------------------- */
.container-header {
    z-index: 10;
    background-color: #fff;
    background-image: none;
    position: relative;
    box-shadow: var(--shadow-sm);
    padding-bottom: .5rem;
}

.container-header .navbar-brand {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

.container-header .navbar-brand img {
    width: 75px;
    min-width: 75px;
}

.container-header .site-description {
    color: #000;
    white-space: normal;
    font-size: 1rem;
    display: flex;
    justify-content: end;
    border-left: 1px solid #dfe3e7;
    padding: 0 0 0 24px;
    max-width: 315px;
}

.container-header .sitetitle {
    color: #000;
    white-space: normal;
    font-size: 1rem;
}

.header_search,
.header_social {
    display: flex;
    align-items: center;
    justify-content: end;
}

.header_social i.fa-brands {
    margin: 0 8px 0 0;
}

.header_search button.btn.btn-primary i.fas.fa-search {
    margin: 0 12px 0 0;
}

.col-md-2.header_logo {
    width: 11%;
}

/* --------------------------------------------------------------------------
   4. Мобильное меню / offcanvas
   -------------------------------------------------------------------------- */
.offcanvas.show {
    background-color: var(--cassiopeia-color-primary);
    background-image: linear-gradient(
            135deg,
            var(--cassiopeia-color-primary),
            var(--cassiopeia-color-hover)
    );
}

.offcanvas-header > *:only-child {
    margin-left: auto;
}

.container-header .container-nav {
    justify-content: flex-start;
    padding: 0;
    margin: 10px auto 6px auto;
}

/* --------------------------------------------------------------------------
   5. Mega menu (DJ-MegaMenu clean)
   -------------------------------------------------------------------------- */
.dj-megamenu-clean li a.dj-up_a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    height: 24px !important;
    padding: 0 16px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    color: rgba(0, 0, 0, .84) !important;
}

.dj-megamenu-clean li a.dj-up_a > span {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding: 0;
    height: 30px !important;
}

.dj-megamenu-clean a.dj-up_a.last_item_nav {
    padding-right: 8px;
}

li.dj-up.first a.dj-up_a {
    padding: 0 15px 0 10px !important;
}

.dj-megamenu-clean li:hover a.dj-up_a,
.dj-megamenu-clean li.hover a.dj-up_a {
    color: var(--cassiopeia-color-hover) !important;
}

.dj-megamenu-clean li ul.dj-submenu > li:hover > a,
.dj-megamenu-clean li ul.dj-submenu > li.active > a {
    color: var(--cassiopeia-color-hover) !important;
    background: rgb(241, 241, 241);
}

@media (min-width: 992px) {
    .offcanvas-start { width: 100%; }
}

@media (max-width: 991.98px) {
    .offcanvas .metismenu.mod-menu .metismenu-item > ul {
        position: relative;
        width: 100%;
        margin-top: 1rem;
    }
    .offcanvas .metismenu.mod-menu .mm-collapse {
        background-color: transparent;
    }
    .offcanvas .metismenu.mod-menu .metismenu-item > a {
        color: #fff;
    }
}

/* --------------------------------------------------------------------------
   6. Главные новости (mod-mainarticles)
   -------------------------------------------------------------------------- */
.mod-mainarticles-items {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    transition: transform 0.3s;
}

.mod-mainarticles-items.mainnews {
    margin: 20px 0 0 0;
}

.mod-mainarticles-items.mainnews .mod-articles-item-content {
    padding: 20px;
}

h2.mod-articles-title {
    padding: 0;
    font-size: 24px;
    line-height: 32px;
    font-weight: 600;
}

h2.mod-articles-title a,
.lastnews h4.mod-articles-title a {
    color: var(--text-dark);
    text-decoration: none;
}

h2.mod-articles-title a:hover,
.lastnews h4.mod-articles-title a:hover {
    color: var(--cassiopeia-color-hover);
    text-decoration: none;
}

.mod-mainarticles-items.mainnews .main_introtext p {
    font-size: 16px;
    font-weight: 700;
    color: rgba(0, 0, 0, .54);
    line-height: 24px;
    margin: 0 0 1rem 0;
}

.mod-mainarticles-items.mainnews p {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 24px;
    line-height: 1.6;
}

.imagemainnews {
    display: block;
    width: 100%;
    height: 436px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}

a.main_item_link {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.main-news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--text-light);
    font-size: .9rem;
}

.main-news-meta span {
    line-height: normal;
    display: flex;
    align-items: baseline;
}

.main-news-meta span i.far {
    margin: 0 4px 0 0;
}

/* Второй ряд (вторичные новости) */
.mod-mainarticles-items.mainnews-secondrow {
    margin: 16px 0 0 0;
}

.mod-mainarticles-items.mainnews-secondrow .imagemainnews {
    height: 200px;
}

.mod-mainarticles-items.mainnews-secondrow .mod-articles-item-content {
    padding: 20px;
}

.mod-mainarticles-items.mainnews-secondrow h2.mod-articles-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 24px;
}

.mod-mainarticles-items.mainnews-secondrow h2.mod-articles-title a.mod-articles-link {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mod-mainarticles-items.mainnews-secondrow p {
    font-size: .95rem;
    color: var(--text-gray);
    margin-bottom: 15px;
}

.main-leftitemsecond {
    height: 100%;
    min-height: 100%;
    display: flex;
}

/* --------------------------------------------------------------------------
   7. Категории / метки новостей
   -------------------------------------------------------------------------- */
.category-item {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 400;
    background: var(--primary-green);
    margin: 0 0 8px 0;
    color: #fff;
}

.category-item a {
    color: #fff;
    text-decoration: none;
}

.com-content-article.item-page .category-item:hover,
.mod-articles-item-content .category-item:hover {
    background-color: var(--cassiopeia-color-hover);
    border-color: var(--cassiopeia-color-hover);
}

.mod-mainarticles-items-news.lastnews .category-item:hover {
    background: none;
    color: var(--cassiopeia-color-hover);
}

/* --------------------------------------------------------------------------
   8. Сайдбар «Последние новости»
   -------------------------------------------------------------------------- */
.sidebar-right.card.lastnews {
    border-radius: var(--radius);
    margin: 20px 0 0 0;
}

.sidebar-right.card.lastnews .card-body {
    border-radius: var(--radius);
    background: var(--card-bg);
}

.lastnews article.mod-articles-item {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.lastnews article.mod-articles-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.lastnews h4.mod-articles-title {
    font-weight: 600;
    font-size: 18px;
    margin: 4px 0 0 0;
    line-height: 24px;
}

.lastnews .category-item {
    font-size: .75rem;
    color: var(--primary-green);
    font-weight: 600;
    text-transform: uppercase;
    padding: 0;
    background: none;
    margin: 14px 0 0 0;
}

.lastnews .category-item a {
    font-size: .75rem;
    color: var(--primary-green);
    font-weight: 600;
    text-transform: uppercase;
    padding: 0;
    background: none;
    text-decoration: none;
}

.lastnews .main-news-meta {
    border: none;
    padding: 0;
}

/* --------------------------------------------------------------------------
   9. Карточки категорий
   -------------------------------------------------------------------------- */
.category-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 28px 24px;
    box-shadow: var(--shadow-md);
    transition: transform .3s, box-shadow .3s;
    text-align: center;
    border: 1px solid var(--border);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-blue);
}

.category-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #e0f2fe, #dcfce7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    color: var(--primary-blue);
    font-size: 1.5rem;
}

.category-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.category-card p,
.category-card .mod-articlescategories-category-description {
    font-size: .9rem;
    color: var(--text-gray);
    margin-bottom: 18px;
}

.category-link {
    color: var(--primary-blue);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
}

/* --------------------------------------------------------------------------
   10. Истории (history)
   -------------------------------------------------------------------------- */
.wrapper_history {
    margin: 50px auto 0 auto;
}

.history_item {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    transition: transform .3s;
    padding: 20px;
    height: 100%;
}

.history_avatr img {
    width: 90px;
    height: 70px;
    border-radius: var(--radius);
}

.history_title {
    display: flex;
    flex-direction: column;
}

span.history_name a {
    font-weight: 700;
    font-size: 1.3rem;
    text-decoration: none;
    color: var(--text-dark);
}

span.history_name a:hover {
    color: var(--link-hover-color);
}

.history_blcocktitle h2 a {
    text-decoration: none;
    color: var(--text-dark);
}

.history_phrase {
    padding: 18px 0;
    font-style: italic;
}

.history_phrase p {
    margin: 0;
}

span.history_description {
    font-weight: 400;
    color: gray;
}

.hisrory_more {
    margin: 14px 0 0 0;
    display: flex;
    justify-content: end;
}

/* --------------------------------------------------------------------------
   11. Футер
   -------------------------------------------------------------------------- */
.footer {
    background-color: var(--text-dark);
    color: #cbd5e1;
    padding: 60px 0 30px;
    margin-top: 40px;
    background-image: none;
}

.footersocial .overlay {
    display: flex;
    justify-content: space-between;
}

.footersocial .overlay p {
    margin: 0;
}

.overlay.footerinfo {
    flex-direction: column;
    margin: 0 0 20px 0;
}

.overlay.footerinfo a {
    margin: 20px 0 0 0;
}

.overlay.footerinfo .btn,
.overlay.footerinfo button {
    width: 100%;
    margin: 12px 0 0 0;
}

.overlay.border-radius {
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.overlay.border-radius img {
    border-radius: 5px;
}

.full-width.footer-bottom {
    background: #F4F4F4;
}

/* --------------------------------------------------------------------------
   12. Карусель логотипов в футере
   -------------------------------------------------------------------------- */
.footer-carousel {
    max-width: 100%;
    margin: 0 auto;
    position: relative;
}

.footer-carousel .carousel-inner {
    padding: 0 50px;
}

.footer-carousel .carousel-item {
    text-align: center;
}

.footer-carousel .carousel-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    height: 100%;
    min-height: 100px;
}

.footer-carousel img {
    max-height: 64px;
    width: auto;
    margin: 0 auto;
    filter: grayscale(100%);
    transition: .3s;
    display: block;
}

.footer-carousel img:hover {
    filter: grayscale(0);
}

.footer-carousel .carousel-control-prev,
.footer-carousel .carousel-control-next {
    width: 40px;
    height: 40px;
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
    opacity: .6;
    transition: opacity .3s;
    background: transparent;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-carousel .carousel-control-prev { left: 0; }
.footer-carousel .carousel-control-next { right: 0; }

.footer-carousel .carousel-control-prev:hover,
.footer-carousel .carousel-control-next:hover {
    opacity: 1;
}

.footer-carousel .carousel-control-prev-icon,
.footer-carousel .carousel-control-next-icon {
    background-color: transparent;
    background-size: 100% 100%;
    width: 30px;
    height: 30px;
}

.footer-carousel .carousel-control-prev-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}

.footer-carousel .carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.footer-carousel .row-cols-8 {
    display: flex;
    flex-wrap: wrap;
}

.footer-carousel .carousel-item-slide {
    flex: 0 0 12.5%; /* 8 элементов */
    padding: 0 10px;
    text-align: center;
}

.footer-carousel .card-body,
.footer-carousel .carousel-indicators {
    display: none;
}

.footer-carousel ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

@media screen and (max-height: 800px) {
    .footer-carousel img { max-height: 40px; }
}

@media (max-width: 1200px) {
    .footer-carousel .carousel-item-slide { flex: 0 0 16.666%; }
}
@media (max-width: 992px) {
    .footer-carousel .carousel-item-slide { flex: 0 0 20%; }
}
@media (max-width: 768px) {
    .footer-carousel .carousel-item-slide { flex: 0 0 25%; }
}
@media (max-width: 576px) {
    .footer-carousel .carousel-item-slide { flex: 0 0 33.333%; }
}
@media (max-width: 480px) {
    .footer-carousel .carousel-item-slide { flex: 0 0 50%; }
}

/* --------------------------------------------------------------------------
   13. Блог: страница категории
   -------------------------------------------------------------------------- */
.category-page .page-title {
    text-align: center;
    padding: 40px 0 20px;
    background: linear-gradient(135deg, #f9f9f9 0%, #ffffff 100%);
    margin-bottom: 40px;
}

.category-page .page-title .breadcrumbs {
    margin-bottom: 1.5rem;
}

.category-page .page-title .breadcrumb {
    justify-content: center;
    background: transparent;
    padding: 0;
}

.category-page .page-title .breadcrumb-item a {
    color: var(--accent-color);
    text-decoration: none;
}

.category-page .page-title .breadcrumb-item.active {
    color: var(--heading-color);
}

.category-page .title-wrapper h1,
.category-page .title-wrapper h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 1rem;
}

.category-page .title-wrapper p {
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 800px;
    margin: 0 auto;
}

h1.category-title {
    padding: 0;
    line-height: 16px;
    margin: -6px 0 20px 0;
    font-size: 28px;
}

/* --------------------------------------------------------------------------
   14. Карточка статьи (blog-item-card)
   -------------------------------------------------------------------------- */
.blog-item-card {
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
    padding: 18px;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    transition: transform .3s ease, box-shadow .3s ease;
}

.blog-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, .12);
}

.blog-item-card .post-img {
    margin: -18px -18px 15px -18px;
    overflow: hidden;
}

.blog-item-card .post-img img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform .3s ease;
}

.blog-item-card:hover .post-img img {
    transform: scale(1.05);
}

.blog-item-card .post-category {
    font-size: 14px;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 10px;
}

.blog-item-card .title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px 0;
    line-height: 1.4;
}

.blog-item-card .title a {
    color: var(--heading-color);
    text-decoration: none;
    transition: color .3s;
}

.blog-item-card .title a:hover {
    color: var(--accent-color);
}

.blog-item-card .post-author-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
}

.blog-item-card .post-author {
    font-weight: 400;
    margin-bottom: 5px;
    color: var(--heading-color);
}

.blog-item-card .post-date {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   15. Сайдбар-виджеты
   -------------------------------------------------------------------------- */
.sidebar .widgets-container {
    margin-top: 0;
}

.widget-item {
    margin-bottom: 30px;
    background: #f9f9f9;
    border: 1px solid #e9ecef;
    padding: 25px;
    border-radius: 10px;
}

.widget-title {
    color: var(--heading-color);
    font-size: 20px;
    font-weight: 600;
    padding: 0 0 0 12px;
    margin: 0 0 20px 0;
    border-left: 4px solid var(--accent-color);
}

/* Поиск */
.search-widget form {
    background: #fff;
    border: 1px solid #dee2e6;
    padding: 5px 10px;
    position: relative;
    border-radius: 50px;
    transition: .3s;
}

.search-widget form input[type="text"] {
    border: 0;
    padding: 8px 10px;
    width: calc(100% - 40px);
    background: transparent;
    outline: none;
}

.search-widget form button {
    background: none;
    border: 0;
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    padding: 0 16px;
    color: var(--accent-color);
}

.search-widget form:focus-within {
    border-color: var(--accent-color);
}

/* Категории */
.categories-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.categories-widget ul li {
    padding: 8px 0;
}

.categories-widget ul li a {
    color: #495057;
    text-decoration: none;
    transition: color .3s;
}

.categories-widget ul li a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

/* Последние посты (виджет) */
.recent-posts-widget .post-item {
    display: flex;
    margin-bottom: 20px;
    align-items: flex-start;
}

.recent-posts-widget .post-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 15px;
}

.recent-posts-widget .post-item h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.4;
}

.recent-posts-widget .post-item h4 a {
    color: var(--heading-color);
    text-decoration: none;
}

.recent-posts-widget .post-item h4 a:hover {
    color: var(--accent-color);
}

.recent-posts-widget .post-item time {
    font-size: 12px;
    color: #6c757d;
}

/* Теги */
.tags-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags-widget ul li a {
    background: #e9ecef;
    color: #495057;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    transition: all .3s;
    display: inline-block;
}

.tags-widget ul li a:hover {
    background: var(--accent-color);
    color: #fff;
}

/* --------------------------------------------------------------------------
   16. Пагинация
   -------------------------------------------------------------------------- */
.pagination-2 {
    padding-top: 0;
}

.pagination-2 ul.pagination {
    justify-content: center;
    gap: 8px;
    margin: 26px 0 10px 0;
}

.pagination-2 .pagination li a,
.pagination-2 .pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--accent-color);
    text-decoration: none;
    transition: all .3s;
}

.pagination-2 .pagination li.active span,
.pagination-2 .pagination li a:hover {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

.pagination-2 .pagination li a:hover span {
    color: #fff;
}

.breadcrumb {
    background-color: transparent;
    margin-bottom: 0;
}

.page-item:first-child .page-link,
.page-item:last-child .page-link {
    border-radius: 50%;
}

.page-item.active > .page-link {
    z-index: 3;
    color: #fff;
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.pagination li.active > a.page-link {
    color: #fff;
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

li.page-item a {
    border-color: var(--accent-color);
}

/* --------------------------------------------------------------------------
   17. Сайдбар: мини-карточки статей
   -------------------------------------------------------------------------- */
.sidebar-rightin .item_recent h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 0;
}

.sidebar-rightin .item_recent h4 a {
    color: var(--default-color);
    transition: .3s;
    text-decoration: none;
}

.sidebar-rightin .item_recent h4 a:hover {
    color: var(--accent-color);
}

.sidebar-rightin .item_recent dd.mod-articles-date {
    display: block;
    font-size: 14px;
    color: color-mix(in srgb, var(--default-color), transparent 50%);
}

.sidebar-rightin .item_recent figure.mod-articles-image.item-image img {
    border-radius: 5px;
    height: 70px;
}

.item_recent,
.row.item_recent {
    margin: 0 0 20px 0;
}

.itemrecent_infoblcok {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

/* Line-clamp заголовка */
.itemrecent_infoblcok .mod-articles-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    white-space: normal;
    max-height: calc(1.4em * 2);
}

/* Sidebar sticky */
.sidebar-right_lastnews {
    margin-bottom: 20px;
    background-color: color-mix(in srgb, var(--default-color), transparent 98%);
    border: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
    padding: 30px;
    border-radius: 5px;
    z-index: 1;
}

.sidebar-right_lastnews.sticky-top {
    top: 80px;
}

.sidebar-right_lastnews figcaption {
    display: none;
}

/* --------------------------------------------------------------------------
   18. Фильтры / микс-контролы
   -------------------------------------------------------------------------- */
.mix-controls .mix-filters .button,
.inner-mix .button {
    background-color: color-mix(in srgb, var(--default-color), transparent 94%) !important;
    color: color-mix(in srgb, var(--default-color), transparent 30%) !important;
    border-radius: 50px;
    font-size: 16px;
    padding: 5px 15px;
    margin: 0 6px 8px 0;
    display: inline-block;
    transition: .3s;
    text-decoration: none;
}

.mix-controls .mix-filters .button:hover,
.inner-mix .button:hover {
    background: var(--accent-color) !important;
    color: var(--contrast-color) !important;
    cursor: pointer;
}

#Controls135 .button.active {
    background: var(--accent-color) !important;
    color: #fff !important;
}

.mix-controls .mix-filters {
    width: 100%;
    vertical-align: top;
    text-align: left;
}

/* --------------------------------------------------------------------------
   19. Хлебные крошки
   -------------------------------------------------------------------------- */
.mod-breadcrumbs__wrapper {
    margin-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.mod-breadcrumbs.breadcrumb {
    background: transparent;
    padding: 12px 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.mod-breadcrumbs__item {
    font-size: 14px;
}

.mod-breadcrumbs__item a {
    color: #adb5bd;
    text-decoration: none;
    transition: color .2s;
    position: relative;
}

.mod-breadcrumbs__item a:hover {
    color: #212529;
}

.mod-breadcrumbs__item.active {
    color: #212529;
    font-weight: 500;
}

li.mod-breadcrumbs__divider {
    margin: 0 12px 0 0;
}

.mod-breadcrumbs__divider i {
    color: #adb5bd;
    font-size: 14px;
}

.mod-breadcrumbs__here {
    color: #adb5bd;
    font-size: 13px;
    margin-right: 8px;
}

/* --------------------------------------------------------------------------
   20. Статья
   -------------------------------------------------------------------------- */
figure.item-image {
    margin: 0 0 1em 0;
    border-radius: 5px;
}

figure.item-image img {
    border-radius: 5px;
    width: 100%;
}

.com-content-article__body p {
    color: #22262a;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
}

.com-content-article__body img {
    width: 100%;
    border-radius: 5px;
}

.com-content-article__body img.alignleft {
    width: 160px;
    float: left;
    margin: 0 20px 10px 0;
}

.com-content-article__body img.ize-thumbnail.alignleft {
    width: 150px !important;
    display: block;
}

img.size-thumbnail.alignleft {
    width: 150px;
    float: left;
}

img.alignright {
    float: right;
    margin: 10px 0 15px 30px;
    max-width: 350px;
    width: auto;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    border-radius: 10px;
}

.com-content-article__body ul li,
.com-content-article__body ol li {
    margin-bottom: 4px;
    color: #22262a;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
}

.com-content-article ol,
.com-content-article ul {
    overflow: hidden;
    padding-left: 1rem;
}

.infotext p { font-size: 12px; }
span.promo { font-weight: 700; }

a[href*="//zen.yandex.ru/"] {
    display: inline !important;
}

/* Автор */
.author-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
    margin: 0 0 2rem 0;
}

.author-info .post-meta {
    color: color-mix(in srgb, var(--default-color), transparent 30%);
    font-size: .95rem;
}

.author-details .info dd.createdby {
    margin: 0;
    font-size: 16px;
    color: var(--heading-color);
}

/* Теги статьи */
.tags-list a {
    background-color: color-mix(in srgb, var(--default-color), transparent 94%);
    color: color-mix(in srgb, var(--default-color), transparent 30%);
    border-radius: 50px;
    font-size: 14px;
    padding: 5px 15px;
    margin: 0 6px 8px 0;
    display: inline-block;
    transition: .3s;
    text-decoration: none;
}

.tags-list a:hover,
button.tag-filter-btn.active,
button.tag-filter-btn:hover {
    background: var(--accent-color);
    color: var(--contrast-color);
}

button.tag-filter-btn {
    background-color: color-mix(in srgb, var(--default-color), transparent 94%);
    color: color-mix(in srgb, var(--default-color), transparent 30%);
    border-radius: 50px;
    font-size: 16px;
    padding: 5px 15px;
    margin: 0 6px 8px 0;
    display: inline-block;
    transition: .3s;
    text-decoration: none;
    border: none;
}

ul.mod-tagssimilar.tagssimilar.mod-list li a {
    color: var(--default-color);
    text-decoration: none;
    font-weight: bold;
    line-height: 18px;
    display: block;
    margin: 0 0 12px 0;
}

/* --------------------------------------------------------------------------
   21. Экспертные блоки
   -------------------------------------------------------------------------- */
.expert-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    margin: 20px 0;
    background: #f7f9fb;
    border-left: 3px solid var(--accent-color);
    border-radius: 4px;
}

.expert-info__photo img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.expert-info__name {
    font-weight: 600;
    color: #222;
    font-size: 16px;
    line-height: 1.3;
}

.expert-info__position {
    color: #666;
    font-size: 14px;
    line-height: 1.3;
    margin-top: 2px;
}

.expert-comment {
    margin: 24px 0;
    padding: 20px 24px;
    background: #fafafa;
    border-left: 4px solid var(--accent-color);
    border-radius: 4px;
    font-size: 15px;
    line-height: 1.55;
    color: #333;
}

.expert-comment__label {
    font-weight: 600;
    color: var(--accent-color);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .5px;
    margin-bottom: 10px;
}

.expert-comment__text p { margin: 0 0 12px; }
.expert-comment__text p:last-child { margin-bottom: 0; }

.expert-comment__author {
    margin-top: 14px;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.expert-comment__author span { color: #888; }

.expert-comment-quote__text {
    position: relative;
    margin: 10px 0 0 0;
    padding: 20px 20px 20px 50px;
    font-size: 1.25rem;
    font-style: italic;
    line-height: 1.6;
    border-left: 4px solid var(--accent-color);
    background-color: #f8fafc;
    color: #334155;
}

.expert-comment-quote__text::before {
    content: "\201C";
    position: absolute;
    top: -10px;
    left: 10px;
    font-size: 5rem;
    font-family: Georgia, serif;
    color: var(--accent-color);
    opacity: .3;
    line-height: 1;
}

p.expert-comment-quote__name {
    margin: 0;
}

/* --------------------------------------------------------------------------
   22. Калькулятор (расчёт)
   -------------------------------------------------------------------------- */
.descrptioncalc p {
    border-radius: 4px;
    border: 1px solid #000;
    padding: 40px;
    font-size: 1rem;
    margin: 20px 0 40px 0;
}

._head_wlnir_34 { font-size: 12px; }

.wrapper_raschet {
    border: 1px solid #c7c7c7;
    border-radius: 4px;
    padding: 20px;
    margin: 20px auto 60px auto;
    width: 540px;
    box-shadow: 0 5px 10px 2px rgba(34, 60, 80, .2);
}

.wrapper_raschet__header {
    margin: 0 0 14px 0;
}

.form_limf,
.rkform_age,
.stadiy_t,
.stepen_g,
.percentki {
    display: flex;
    flex-direction: column;
    margin: 20px 0;
}

.rkmform_buttons {
    display: flex;
    justify-content: space-between;
}

.wrappercalcur {
    background: var(--accent-color);
    border-radius: 8px;
    padding: 10px 20px;
    position: absolute;
    z-index: 9;
}

.wrappercalcur a {
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.wrappercalcur:hover {
    opacity: .9;
    cursor: pointer;
}

span.result {
    font-weight: 300;
    display: inline-block;
    line-height: 1.7;
    padding: 25px;
    background: rgb(242, 243, 245);
    margin: 10px 0;
    border-radius: 8px;
}

/* --------------------------------------------------------------------------
   23. Модальное окно / поиск
   -------------------------------------------------------------------------- */
.modal-backdrop {
    background-color: #000;
    height: 100vh;
    left: 0;
    position: fixed;
    top: 0;
    width: 100vw;

    /*
     * ВАЖНО: уводим backdrop под контент страницы.
     * Bootstrap по умолчанию даёт ему z-index: 1050 — тогда он
     * затеняет сайт и перехватывает клики. Для этого шаблона
     * нужно, чтобы окно поиска (#mlsModal, z-index: 1055)
     * открывалось поверх страницы без затемнения.
     */
    z-index: -1;
}

.modal-open #mlsModal.modal {
    background: #fff;
    box-shadow: 4px 4px 8px 0 rgba(34, 60, 80, .2);
    border: 1px solid #dbdbdb;
    overflow-x: hidden;
}

.mls-result-tags {
    display: flex;
    gap: 20px;
    font-size: 14px;
    align-items: baseline;
    color: #8b8b8b;
}

.mls-result-tags .author-details .info dd.createdby {
    margin: 0;
    font-size: 14px;
    color: #8b8b8b;
}

/* --------------------------------------------------------------------------
   24. Cookie-consent / прочее
   -------------------------------------------------------------------------- */
.cc_div #cm.has-tertiary-button {
    max-width: 50em !important;
}

.cc_div a {
    border-bottom: none !important;
}

.yottie-widget-header-inner {
    padding: 0 20px 16px 20px !important;
}

.yottie-widget-feed-inner .yottie-widget-feed-section-pagination {
    position: relative !important;
    padding: 5px !important;
}

/* --------------------------------------------------------------------------
   25. Sticky-обёртка
   -------------------------------------------------------------------------- */
.sticky-wrapper {
    position: sticky;
    top: 140px;
}

/* --------------------------------------------------------------------------
   26. Утилиты / сетка
   -------------------------------------------------------------------------- */
.allnews {
    margin: -30px 0 0 0;
}

.col-md-8.wrapper_leftcolumn {
    padding-left: 0;
}

.com-content-category-blog.category-page .container,
.com-content-category-blog.category-page .container .row .col-lg-12 {
    padding-left: 0;
}

.row.gy-4 > .col-lg-6:nth-child(-n+2) {
    margin-top: 0 !important;
}

.row.gy-4 > .col-lg-6:nth-child(odd) {
    margin-left: 0 !important;
    padding-left: 0 !important;
}
.history_blcocktitle h2 a:hover {
    color:var(--link-hover-color);
}
.linkhistory_mobile {
    margin: -15px 0 0 0;
}
/* --------------------------------------------------------------------------
   27. Медиа-запросы
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .history_blcocktitle.d-flex.align-items-center.justify-content-between a.category-link {
        display:none;
    }
    .category-page .title-wrapper h1,
    .category-page .title-wrapper h2 {
        font-size: 1.75rem;
    }
    .blog-item-card .post-img img {
        height: 200px;
    }
    .widget-item {
        padding: 20px;
    }
}

@media (max-width: 778px) {
    .container-component {
        grid-area: comp;
        padding: 0 12px 0 12px;
    }
    .mod-mainarticles-items.mainnews,
    .sidebar-right.card.lastnews {
        margin: 20px 0;
    }

    .pagination-2 ul.pagination {
        width: 100%;
        max-width: 100%;
        gap: 5px;
    }

    section#pagination-2 { margin: 0 0 20px 0; }
    nav.pagination__wrapper { margin: -10px 0 0 0; }

    .com-content-category-blog.category-page .container,
    .com-content-category-blog.category-page .container .row .col-lg-12 {
        padding: 0;
    }

    .row.gy-4 > .col-lg-6 {
        padding: 0;
        margin: 0 0 20px 0;
    }

    section#mod-ajax-articles-136 .col-lg-4 { padding: 0; }

    .itemrecent_infoblcok {
        padding: 0 16px;
    }

    ul.mod-tagssimilar.tagssimilar.mod-list,
    .current-article-tags-block .tags-list {
        padding: 0 16px;
    }

    .widget-title {
        color: var(--heading-color);
        font-size: 20px;
        font-weight: 600;
        padding: 0 0 0 12px;
        margin: 0 16px 20px 16px;
        border-left: 4px solid var(--accent-color);
    }

    .sidebar-right_lastnews { padding: 16px 0; }

    .container-component.container > .row > .col-md-4 { padding: 0; }

    .author-info {
        margin: 12px 0;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding: 0;
    }

    .history .main-news-meta {
        justify-content: end;
        align-items: center;
    }

    .history_title { padding: 0 16px; }
    .history_phrase { padding: 10px 16px; }
    .history_item { padding: 0 0 20px 0; }

    .history_item > .row > .col-md-4,
    .history_item > .row > .col-md-8,
    .history_item > .row > .col-md-12 {
        padding: 0;
    }

    .history_item > .row > .col-md-8 { margin: 8px 0 0 0; }

    .history_avatr img {
        width: 100%;
        height: auto;
        border-radius: var(--radius) var(--radius) 0 0;
    }

    .mod-history-items > .col-md-4 { padding: 0; }

    .lastnews article.mod-articles-item {
        padding: 20px 0;
        border-bottom: 1px solid var(--border);
    }

    .wrapper_secondnews { padding: 0; margin: 0 0 20px 0; }
    .wrapper_leftcolumn { padding: 0; }

    img.alignright {
        float: none;
        max-width: 100%;
        margin: 12px 0;
        width: 100%;
    }

    iframe { max-width: 100%; }

    .com-tags-tags__filter.btn-group {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
    }

    #mlsModal.modal .modal-dialog {
        max-width: 100%;
        margin: 0;
        width: 100%;
    }

    #mlsModal .search-results .search-result {
        margin: 0;
        flex-direction: column;
    }

    .mls-results .result-image {
        padding: 0;
        max-width: 100% !important;
        display: block;
        width: 100%;
    }

    .result-info.col.ps-4 {
        padding: 0 !important;
        margin: 16px 0 0 0;
    }

    .modal-open #mlsModal.modal {
        top: 10%;
        bottom: 10%;
        left: 0;
        height: auto;
        width: 90%;
        margin: auto;
        right: 0;
    }

    .mls-result-tags { flex-direction: column; }

    .col-md-2.header_logo { width: 100%; }

    .container-header .site-description {
        max-width: 80%;
        text-align: center;
        margin: 0 0 10px 0;
        padding: 0;
        border: none;
    }

    .sidebar-rightin .item_recent figure.mod-articles-image.item-image img {
        border-radius: 0;
        height: 100%;
    }

    .header_social { justify-content: center; }
    .grid-child.container-nav { justify-content: end; }

    .dj-megamenu-wrapper {
        margin: 10px 10px 0 10px;
        position: fixed;
        top: 12px;
    }

    .dj-megamenu-select-dark .dj-mobile-open-btn,
    .dj-megamenu-offcanvas-dark .dj-mobile-open-btn,
    .dj-megamenu-accordion-dark .dj-mobile-open-btn {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        margin: 0 auto;
        padding: 0;
        width: 45px;
        height: 45px;
        background: var(--accent-color) !important;
        color: #e4e4e4;
        border: none;
        text-align: center;
        border-radius: 3px;
        transition: background-color .2s ease-out, color .2s ease-out;
        text-decoration: none;
    }

    .dj-mobile-open-btn.active .dj-mobile-open-icon,
    .dj-megamenu-select-dark .dj-mobile-open-btn:focus,
    .dj-megamenu-select-dark:hover .dj-mobile-open-btn,
    .dj-megamenu-offcanvas-dark .dj-mobile-open-btn:hover,
    .dj-megamenu-offcanvas-dark .dj-mobile-open-btn:focus,
    .dj-megamenu-accordion-dark .dj-mobile-open-btn:hover,
    .dj-megamenu-accordion-dark .dj-mobile-open-btn:focus {
        background: #e4e4e4;
        color: #434343;
    }

    .header_search {
        justify-content: center;
        margin: 14px 0 10px 0;
    }

    .mod-history-items.history.row { gap: 30px; }

    .dj-offcanvas-dark {
        background: #ededed !important;
        color: #aeaeae !important;
    }

    ul.dj-mobile-dark li.dj-mobileitem > a {
        display: block;
        font-size: 14px;
        line-height: 1;
        background: #ededed !important;
        color: #393939 !important;
        text-decoration: none;
        padding: 20px 15px;
        cursor: pointer;
        border-top: 1px solid #434343;
        transition: background-color .2s ease-out;
    }

    .dj-offcanvas-dark .dj-offcanvas-top {
        background: #ededed !important;
        text-align: right;
    }

    .dj-offcanvas-dark .dj-offcanvas-close-btn {
        display: inline-block;
        font-size: 20px;
        line-height: 1;
        background: none;
        border: none;
        color: #000 !important;
        cursor: pointer;
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .expert-info { gap: 12px; padding: 12px; }
    .expert-info__photo img { width: 50px; height: 50px; }
    .expert-info__name { font-size: 15px; }
    .expert-info__position { font-size: 13px; }
}