/* Справочник + экосистемная шапка: ссылки, карточки, футер, крошки */

/* ——— Скрыть legacy-сайдбар (источник «плавающих» Данетки/Загадки) ——— */
body.eco-has-header .site-sidebar-wrapper,
body.eco-has-header .mobile-header-active,
body.spravochnik-has-header .site-sidebar-wrapper,
body.spravochnik-has-header .mobile-header-active {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* ——— Эстетичные ссылки (не синие с подчёркиванием) ——— */
body.eco-has-header .layout-content a:not(.btn):not(.eco-btn):not(.eco-nav__link):not(.eco-mobile-nav__link):not(.game-card):not(.category-card):not(.spr-subnav__link):not(.spr-subnav__add):not(.dropdown-item):not(.section-link):not(.quick-links-nav a):not(.home-search-btn):not(.breadcrumb a):not(.footer-list a):not(.spr-footer a):not(.rimma-banner a) {
    color: #c45a2e;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(196, 90, 46, 0.28);
    transition: color 0.15s ease, border-color 0.15s ease;
}

body.eco-has-header .layout-content a:not(.btn):not(.eco-btn):not(.game-card):not(.category-card):not(.spr-subnav__link):not(.dropdown-item):hover {
    color: #e8703a;
    border-bottom-color: rgba(232, 112, 58, 0.65);
}

body.eco-has-header .layout-content a:focus-visible {
    outline: 2px solid rgba(232, 112, 58, 0.45);
    outline-offset: 2px;
    border-bottom-color: transparent;
}

/* ——— Хлебные крошки ——— */
.breadcrumb-site-wrap.page-header.breadcrumb-wrap {
    background: #faf8f6;
    border-bottom: 1px solid rgba(46, 42, 40, 0.08);
    padding: 0.65rem 0;
    margin: 0;
}

.breadcrumb-site-wrap .breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.82rem;
    gap: 0.15rem;
}

.breadcrumb-site-wrap .breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
}

.breadcrumb-site-wrap .breadcrumb-item + .breadcrumb-item::before {
    content: '›';
    color: rgba(46, 42, 40, 0.28);
    padding: 0 0.25rem;
    float: none;
}

.breadcrumb-site-wrap .breadcrumb a {
    color: rgba(46, 42, 40, 0.62);
    text-decoration: none;
    font-weight: 500;
    border-bottom: none;
    padding: 0.2rem 0.35rem;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

.breadcrumb-site-wrap .breadcrumb a:hover {
    color: #e8703a;
    background: rgba(232, 112, 58, 0.08);
}

.breadcrumb-site-wrap .breadcrumb .breadcrumb-sep {
    color: rgba(46, 42, 40, 0.28);
    margin: 0 0.1rem;
    font-size: 0.7rem;
}

.breadcrumb-site-wrap .breadcrumb .breadcrumb-current {
    color: #2e2a28;
    font-weight: 600;
    border-bottom: none;
    padding: 0.2rem 0.35rem;
    background: rgba(232, 112, 58, 0.1);
    border-radius: 6px;
}

.breadcrumb-site-wrap .breadcrumb a i {
    color: #e8703a;
}

/* ——— Горизонтальные карточки игр (главная) ——— */
.home-page .games-grid {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.home-page .game-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    min-height: 88px;
}

.home-page .game-card-thumb {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    flex-shrink: 0;
}

.home-page .game-card-body {
    flex: 1;
    min-width: 0;
}

.home-page .game-card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0.35rem 0 0;
}

.home-page .game-card-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(232, 112, 58, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s, transform 0.15s;
}

.home-page .game-card:hover .game-card-arrow {
    background: rgba(232, 112, 58, 0.18);
    transform: translateX(2px);
}

/* ——— Горизонтальные карточки (категории, поиск) ——— */
body.eco-has-header .compact-game-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    border: 1px solid rgba(46, 42, 40, 0.08);
    box-shadow: 0 2px 8px rgba(34, 45, 50, 0.04);
}

body.eco-has-header .compact-game-media {
    flex-shrink: 0;
}

body.eco-has-header .compact-game-thumb {
    width: 76px;
    height: 76px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(232, 112, 58, 0.15);
}

body.eco-has-header .compact-game-content {
    flex: 1;
    min-width: 0;
}

body.eco-has-header .compact-game-title {
    font-size: 1.02rem;
    font-weight: 600;
    color: #2e2a28;
}

body.eco-has-header .compact-game-title a,
body.eco-has-header .compact-game-card a {
    color: #2e2a28;
    text-decoration: none;
    border-bottom: none;
}

body.eco-has-header .compact-game-card:hover .compact-game-title {
    color: #e8703a;
}

body.eco-has-header .compact-game-description {
    color: rgba(46, 42, 40, 0.72);
    font-size: 0.9rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ——— Категория: контент + сайдбар в ряд ——— */
@media (min-width: 992px) {
    .category-layout__content {
        order: 1;
    }

    .category-layout__sidebar {
        order: 2;
    }

    .category-sidebar-sticky {
        position: sticky;
        top: calc(var(--eco-header-h, 56px) + 64px);
        max-height: calc(100vh - var(--eco-header-h, 56px) - 80px);
        overflow-y: auto;
        padding-right: 0.25rem;
    }
}

.category-filter-widget {
    background: #fff;
    border: 1px solid rgba(46, 42, 40, 0.08);
    border-radius: 16px;
    padding: 1.15rem 1.2rem;
    box-shadow: 0 2px 12px rgba(34, 45, 50, 0.05);
}

.category-filter-widget__title {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 700;
    color: #2e2a28;
    padding-bottom: 0.65rem;
    border-bottom: 2px solid rgba(232, 112, 58, 0.25);
}

.category-filter-group {
    margin-bottom: 0.85rem;
}

.category-filter-group--spaced {
    margin-top: 0.5rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(46, 42, 40, 0.06);
}

.category-filter-group__label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(46, 42, 40, 0.55);
    margin-bottom: 0.5rem;
}

.category-filter-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.category-filter-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0;
    padding: 0.35rem 0.45rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.category-filter-check:hover {
    background: rgba(232, 112, 58, 0.06);
}

.category-filter-check__input {
    margin-top: 0.15rem;
    accent-color: #e8703a;
    flex-shrink: 0;
}

.category-filter-check__text {
    font-size: 0.86rem;
    color: #3d3836;
    line-height: 1.35;
}

.category-filter-widget__submit {
    margin-top: 0.75rem;
    border-radius: 10px;
    font-weight: 600;
}

.category-filter-widget .list-group,
.category-filter-widget .list-group-item {
    border: none;
    background: transparent;
    padding: 0;
}

/* ——— Футер: плавный переход от контента ——— */
body.eco-has-header .layout-main {
    background: linear-gradient(180deg, #fff 0%, #f7f5f3 100%);
}

body.eco-has-header .site-footer-wrapper {
    background: linear-gradient(180deg, #f7f5f3 0%, #ebe8e5 100%);
    padding-top: 0.5rem;
}

body.eco-has-header .spr-footer a {
    border-bottom: none;
}

/* ——— Категории (разделы) ——— */
body.eco-has-header .category-hero {
    background: linear-gradient(135deg, #fff 0%, #fafbfc 100%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.85rem;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

body.eco-has-header .category-page-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.02em;
}

body.eco-has-header .category-popular-sections .category-popular-list a {
    border-color: rgba(232, 112, 58, 0.18);
    background: #fff;
    font-weight: 500;
}

body.eco-has-header .category-popular-sections .category-popular-list a:hover {
    border-color: #e8703a;
    color: #e8703a;
    background: rgba(232, 112, 58, 0.08);
}

body.eco-has-header .category-toolbar {
    border-radius: 12px;
    border-color: rgba(46, 42, 40, 0.08);
    box-shadow: 0 2px 8px rgba(34, 45, 50, 0.03);
}

body.eco-has-header .meta-badge,
body.eco-has-header .filter-badge {
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.22rem 0.65rem;
}

body.eco-has-header .filter-badge {
    background: rgba(232, 112, 58, 0.1);
    color: #c45a2e;
    border: 1px solid rgba(232, 112, 58, 0.18);
}

body.eco-has-header .filter-badge:hover {
    background: rgba(232, 112, 58, 0.16);
    color: #e8703a;
}

/* ——— Поиск ——— */
body.eco-has-header .search-page .search-results-header {
    border-left: 4px solid #e8703a;
    border-radius: 16px;
    background: linear-gradient(135deg, #fff9f6 0%, #fff 100%);
    border-top: 1px solid rgba(232, 112, 58, 0.1);
    border-right: 1px solid rgba(232, 112, 58, 0.1);
    border-bottom: 1px solid rgba(232, 112, 58, 0.1);
}

body.eco-has-header .search-page .search-icon-circle {
    background: linear-gradient(135deg, #e8703a, #f07a3f);
}

body.eco-has-header .search-page .sidebar-widget-card {
    border-radius: 14px;
    border: 1px solid rgba(46, 42, 40, 0.08);
    box-shadow: 0 2px 10px rgba(34, 45, 50, 0.04);
}

body.eco-has-header .search-page .sidebar-widget-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 1rem;
    font-weight: 700;
    color: #2e2a28;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid rgba(46, 42, 40, 0.08);
    margin-bottom: 1rem;
}

body.eco-has-header .search-page .sidebar-widget-title i {
    color: #e8703a;
}

body.eco-has-header .search-page .popular-game-item {
    border-radius: 10px;
    transition: background 0.15s;
}

body.eco-has-header .search-page .popular-game-item:hover {
    background: rgba(232, 112, 58, 0.06);
}

body.eco-has-header .search-page .suggestion-tag {
    border-radius: 999px;
    border: 1px solid rgba(232, 112, 58, 0.2);
    background: #fff;
    color: #c45a2e;
    font-weight: 500;
}

body.eco-has-header .search-page .suggestion-tag:hover {
    background: rgba(232, 112, 58, 0.1);
    color: #e8703a;
}

body.eco-has-header .search-page .active-filter-badge {
    border-radius: 999px;
    background: rgba(232, 112, 58, 0.12);
    color: #c45a2e;
    border: 1px solid rgba(232, 112, 58, 0.2);
}

body.eco-has-header .page-header.breadcrumb-wrap:not(.breadcrumb-site-wrap) {
    display: none;
}
