/* =========================================================
   MOD CARD
   ========================================================= */

.mod-card {
    height: 100%;
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(31, 36, 51, 0.04);
    transform: none;
    transition: none;
}

.mod-card:hover {
    transform: none;
    box-shadow: 0 12px 32px rgba(31, 36, 51, 0.04);
    border-color: #e8edf5;
}

/* ===== Верх ===== */


.mod-card__img-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #eef2ff 0%, #f7f9ff 100%);
}

.mod-card__img,
.mod-card__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: none;
    transform: none;
    filter: none;
    transform: scale(1);
    transition: transform .45s cubic-bezier(.22,.61,.36,1);
}

.mod-card:hover .mod-card__img,
.mod-card:hover .mod-card__img-wrap img {
    transform: none;
    filter: none;
        transform: scale(1.08);

}

.mod-card__img-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background .3s ease;
    pointer-events: none;

}

.mod-card:hover .mod-card__img-wrap::after {
    background: rgba(0,0,0,0.05);
}

.mod-card__badge {
    position: absolute;
    top: 14px;
    left: 14px;
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 11px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(31, 36, 51, 0.08);
    z-index: 3;
}

/* ===== Контент ===== */

/* ===== Категория ===== */


/* ===== Заголовок ===== */

/* ===== Описание ===== */

/* ===== Мета ===== */

/* ===== Адаптив ===== */


/* =========================================================
   MODS ARCHIVE FILTER BAR
   ========================================================= */

.mods-arc-filter-bar.arc-filter-bar {
    display: block;
    margin: 0 0 24px;
    padding: 16px;
    background: #fff;
    border: 1px solid #edf1f7;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.04);
    
}

.mods-arc-filter-form.arc-filter-form {
    display: grid;
    grid-template-columns: minmax(300px, 1.5fr) minmax(280px, 1.05fr) minmax(260px, 1.05fr) auto;
    gap: 14px;
    align-items: stretch;
}

.arc-fg {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* =========================
   Search
   ========================= */

.arc-search {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 56px;
    border: 0;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    transition: box-shadow .12s ease-out, background .12s ease-out;
    border: 1px solid #e7edf5;
}

.arc-search:hover {
    background: #fff;
}

.arc-search:focus-within {
    box-shadow: 0 0 0 4px rgba(79, 107, 255, 0.07);
}

.arc-search__input {
    width: 100%;
    min-width: 0;
    height: 56px;
    border: 0 !important;
    outline: 0;
    background: transparent;
    padding: 0 44px 0 18px;
    font-size: 15px;
    font-weight: 500;
    color: #1f2433;
    box-shadow: none !important;
    border-radius: 10px;
}

.arc-search__input:focus,
.arc-search__input:hover,
.arc-search__input:active {
    border: 0 !important;
    outline: 0;
    box-shadow: none !important;
}

.arc-search__input::placeholder {
    color: #98a2b3;
    font-weight: 500;
}

/* Кнопка очистки поиска. Раньше она наследовала общий стиль button,
   поэтому отображалась квадратной кнопкой с чёрной рамкой. */
.arc-search__clear {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    min-width: 30px;
    padding: 0 !important;
    margin: 0;
    border: 0 !important;
    border-radius: 50%;
    background: transparent !important;
    box-shadow: none !important;
    color: #98a2b3;
    font: 400 20px/30px Arial, sans-serif;
    text-align: center;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    z-index: 2;
}

.arc-search__clear:hover,
.arc-search__clear:focus-visible {
    color: #1f2433;
    background: #f2f5f9 !important;
    outline: 0;
}

/* Убираем встроенный крестик браузера, чтобы не было двух кнопок очистки. */
.arc-search__input::-webkit-search-cancel-button,
.mods-cat-dropdown__search::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

html.dark .arc-search__clear {
    color: #7f8798;
}

html.dark .arc-search__clear:hover,
html.dark .arc-search__clear:focus-visible {
    color: #d1d5e0;
    background: #2a2d3a !important;
}


/* =========================
   Sort select
   ========================= */

/* =========================
   Category dropdown
   ========================= */

.mods-cat-dropdown {
    position: relative;
    width: 100%;
}

.mods-cat-dropdown__toggle {
    width: 100%;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 16px;
    border: 1px solid #e7edf5;
    border-radius: 10px;
    background: #fff;
    color: #1f2433;
    text-align: left;
    cursor: pointer;
    transition: border-color .12s ease-out, box-shadow .12s ease-out;
}

.mods-cat-dropdown__toggle:hover {
    border-color: #dbe4ef;
}

.mods-cat-dropdown.is-open .mods-cat-dropdown__toggle,
.mods-cat-dropdown__toggle:focus {
    border-color: #cfd8ff;
box-shadow: none;    outline: none;
}

.mods-cat-dropdown__toggle-text {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 15px;
    font-weight: 500;
    color: #1f2433;
}

.mods-cat-dropdown__chevron {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    position: relative;
}

.mods-cat-dropdown__chevron::before,
.mods-cat-dropdown__chevron::after {
    content: "";
    position: absolute;
    top: 4px;
    width: 6px;
    height: 1.5px;
    background: #98a2b3;
    border-radius: 2px;
}

.mods-cat-dropdown__chevron::before {
    left: 0;
    transform: rotate(45deg);
}

.mods-cat-dropdown__chevron::after {
    right: 0;
    transform: rotate(-45deg);
}

.mods-cat-dropdown.is-open .mods-cat-dropdown__chevron::before {
    transform: rotate(-45deg);
}

.mods-cat-dropdown.is-open .mods-cat-dropdown__chevron::after {
    transform: rotate(45deg);
}

.mods-cat-dropdown__panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 100%;
    z-index: 50;
    background: #fff;
    border: 1px solid #e7edf5;
    border-radius: 10px;
    box-shadow: 0 18px 48px rgba(16, 24, 40, 0.12);
    overflow: hidden;
}

.mods-cat-dropdown__search-wrap {
    padding: 12px;
    border-bottom: 1px solid #f0f3f8;
}

.mods-cat-dropdown__search {
    width: 100%;
    height: 42px;
    border: 1px solid #e7edf5;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 14px;
    color: #1f2433;
    outline: none;
    background: #fff;
}

.mods-cat-dropdown__search:focus {
    border-color: #cfd8ff;
box-shadow: none;}

.mods-cat-dropdown__list {
    max-height: 360px;
    overflow-y: auto;
    padding: 8px;
}

.mods-cat-dropdown__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #1f2433;
    transition: background .12s ease-out, color .12s ease-out;
}

.mods-cat-dropdown__item:hover {
    background: #f7f9fc;
}

.mods-cat-dropdown__item.is-active {
    background: #eef2ff;
    color: #3557ff;
}

.mods-cat-dropdown__item[data-depth="1"] .mods-cat-dropdown__name {
    padding-left: 14px;
}

.mods-cat-dropdown__item[data-depth="2"] .mods-cat-dropdown__name {
    padding-left: 28px;
}

.mods-cat-dropdown__item[data-depth="3"] .mods-cat-dropdown__name {
    padding-left: 42px;
}

.mods-cat-dropdown__name {
    min-width: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
}

.mods-cat-dropdown__count {
    flex: 0 0 auto;
    min-width: 28px;
    text-align: right;
    font-size: 13px;
    font-weight: 700;
    color: #98a2b3;
}

.mods-cat-dropdown__item.is-active .mods-cat-dropdown__count {
    color: #3557ff;
}

/* =========================
   Loading
   ========================= */

.mods-arc-filter-form.is-loading {
    opacity: .72;
    pointer-events: none;
}

/* =========================
   Desktop
   ========================= */

@media (min-width: 1100px) {
    .mods-arc-filter-form.arc-filter-form {
        grid-template-columns: minmax(340px, 1.6fr) minmax(320px, 1.15fr) minmax(280px, 1.05fr) auto;
        gap: 16px;
    }
}

/* =========================
   Tablet
   ========================= */

@media (max-width: 980px) {
    .mods-arc-filter-form.arc-filter-form {
        grid-template-columns: 1fr 1fr;
    }

    .mods-arc-filter-form .arc-search {
        grid-column: 1 / -1;
    }

    .mods-filter-reset {
        grid-column: 1 / -1;
    }
}
/* =========================
   Mobile
   ========================= */

@media (max-width: 640px) {
    .mods-arc-filter-bar.arc-filter-bar {
        padding: 14px;
        border-radius: 20px;
    }

    .mods-arc-filter-form.arc-filter-form {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .arc-search,
    .arc-sel,
    .mods-cat-dropdown__toggle {
        min-height: 50px;
        border-radius: 16px;
    }

    .arc-search__input,
    .arc-sel,
    .mods-cat-dropdown__toggle-text {
        font-size: 14px;
    }

    .arc-search__input {
        height: 48px;
        padding-left: 16px;
    }

    .mods-cat-dropdown__panel {
        position: fixed;
        left: 12px;
        right: 12px;
        top: auto;
        width: auto;
        max-height: 70vh;
    }

    .mods-cat-dropdown__list {
        max-height: 50vh;
    }
}

/* =========================
   Sort dropdown
   ========================= */

.mods-sort-dropdown {
    position: relative;
    width: 100%;
}

.mods-sort-dropdown__toggle {
    width: 100%;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 16px;
    border: 1px solid #e7edf5;
    border-radius: 10px;
    background: #fff;
    color: #1f2433;
    text-align: left;
    cursor: pointer;
    transition: border-color .12s ease-out, box-shadow .12s ease-out;
}

.mods-sort-dropdown__toggle:hover {
    border-color: #dbe4ef;
}

.mods-sort-dropdown.is-open .mods-sort-dropdown__toggle,
.mods-sort-dropdown__toggle:focus {
    border-color: #cfd8ff;
box-shadow: none;    outline: none;
}

.mods-sort-dropdown__toggle-text {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 15px;
    font-weight: 400;
    color: #1f2433;
}

.mods-sort-dropdown__chevron {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    position: relative;
}

.mods-sort-dropdown__chevron::before,
.mods-sort-dropdown__chevron::after {
    content: "";
    position: absolute;
    top: 4px;
    width: 6px;
    height: 1.5px;
    background: #98a2b3;
    border-radius: 2px;
}

.mods-sort-dropdown__chevron::before {
    left: 0;
    transform: rotate(45deg);
}

.mods-sort-dropdown__chevron::after {
    right: 0;
    transform: rotate(-45deg);
}

.mods-sort-dropdown.is-open .mods-sort-dropdown__chevron::before {
    transform: rotate(-45deg);
}

.mods-sort-dropdown.is-open .mods-sort-dropdown__chevron::after {
    transform: rotate(45deg);
}

.mods-sort-dropdown__panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 100%;
    z-index: 50;
    background: #fff;
    border: 1px solid #e7edf5;
    border-radius: 18px;
    box-shadow: 0 18px 48px rgba(16, 24, 40, 0.12);
    overflow: hidden;
}

.mods-sort-dropdown__list {
    padding: 8px;
}

.mods-sort-dropdown__item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 42px;
    padding: 0 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #1f2433;
    text-align: left;
    cursor: pointer;
    transition: background .12s ease-out, color .12s ease-out;
}

.mods-sort-dropdown__item:hover {
    background: #f7f9fc;
}

.mods-sort-dropdown__item.is-active {
    background: #eef2ff;
    color: #3557ff;
}

.mods-sort-dropdown__name {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
}

@media (max-width: 640px) {
    .mods-sort-dropdown__toggle {
        min-height: 50px;
        border-radius: 16px;
    }

    .mods-sort-dropdown__toggle-text {
        font-size: 14px;
    }

    .mods-sort-dropdown__panel {
        position: fixed;
        left: 12px;
        right: 12px;
        top: auto;
        width: auto;
    }
}


.mods-filter-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 0 18px;
    border: 1px solid #e7edf5;
    border-radius: 10px;
    background: #fff;
    color: #667085;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: none;
}

.mods-filter-reset:hover {
    color: #1f2433;
    border-color: #dbe4ef;
    background: #f9fbff;
}

.mods-filter-reset--disabled {
    color: #c2c8d2;
    border-color: #eef1f5;
    background: #fafbfc;
    pointer-events: none;
    cursor: not-allowed;
}

.mods-filter-reset--disabled:hover {
    color: #c2c8d2;
    border-color: #eef1f5;
    background: #fafbfc;
}


/* =========================================================
   RSYA CARD IN ARCHIVE
   ========================================================= */

.mod-card--ad {
    height: 100%;
    max-height: 356px;
    overflow: hidden;
}

.post-cards.post-cards--vertical {
    align-items: stretch !important;
}

.post-cards.post-cards--vertical > .mod-card {
    height: 100% !important;
}

.mod-card--ad {
    height: 100% !important;
    max-height: none !important;
    display: flex;
    flex-direction: column;
}

.js-rsya-card.is-pending-ad {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.js-rsya-card.is-loaded {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}


/* ── Бейдж "В тренде" ────────────────────────────────────────────── */

.mod-card__badge--trending {
    background: rgba(255, 237, 213, 0.96);
    border: 1px solid #fdba74;
    color: #c2410c;
    gap: 4px;
}

/* ── Процент одобрения ────────────────────────────────────────────── */

.mod-card__img-overlays {
    position: relative;
    display: block;
}

/* ── Процент одобрения в мета-строке ─────────────────────────────── */

/* ── Процент одобрения в мета-строке ─────────────────────────────── */


/* =========================================================
   FINDING MOD CARD
   ========================================================= */

.mod-card--finding {
    position: relative;
    border-color: rgba(126, 87, 194, 0.28);
    box-shadow: 0 14px 34px rgba(126, 87, 194, 0.12);
    background: linear-gradient(180deg, #fcfaff 0%, #ffffff 100%);
}

.mod-card--finding::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(126, 87, 194, 0.16);
    border-radius: inherit;
}

.mod-card--finding .mod-card__img-wrap {
    background: linear-gradient(135deg, #f4edff 0%, #fcf8ff 100%);
}


/* =========================================================
   FEATURED MOD CARD (GOLD STYLE)
   ========================================================= */

.mod-card--featured {
    position: relative;
    border-color: rgba(212, 175, 55, 0.35);
    box-shadow: 0 14px 34px rgba(212, 175, 55, 0.18);
    background: #fffdf7;
}

.mod-card--featured::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.25);
    border-radius: inherit;
}

.mod-card--featured .mod-card__img-wrap {
    background: linear-gradient(135deg, #fff6d8 0%, #fffdf5 100%);
}

/* =========================================================
   FEATURED BLOCK ("Находки и рекомендации")
   ========================================================= */

/* Компактный ряд, который НЕ растягивает карточки, когда их
   меньше, чем умещается в строке (например, 2 находки вместо 4):
   "фантомные" дорожки auto-fill забирают лишнее место вместо
   того, чтобы раздувать реальные карточки на всю ширину */


/* =========================================================
   "Последние добавленные" — заголовок с иконкой часов
   ========================================================= */

.mods-latest-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #1f2433;
}

.mods-latest-title__icon {
    color: #5b9bd5;
    flex: 0 0 auto;
}

html.dark .mods-latest-title {
    color: #e1e4ed;
}

/* ═══════════════════════════════════════════════════════════════
   DARK THEME — MOD CARD, ФИЛЬТРЫ, ДРОПДАУНЫ
   ═══════════════════════════════════════════════════════════════ */

/* --- Основная карточка --- */

html.dark .mod-card {
    background: #1a1d27;
    border-color: #2a2d3a;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

html.dark .mod-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    border-color: #2a2d3a;
}

html.dark .mod-card__img-wrap {
    background: linear-gradient(135deg, #1e2130 0%, #22252f 100%);
}

/* --- Approval bar --- */

/* --- Featured (gold) card --- */

html.dark .mod-card--featured {
    background: #1e1c14;
    border-color: rgba(212, 175, 55, 0.25);
    box-shadow: 0 14px 34px rgba(212, 175, 55, 0.08);
}

html.dark .mod-card--featured::before {
    box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.15);
}

html.dark .mod-card--featured .mod-card__img-wrap {
    background: linear-gradient(135deg, #2a2510 0%, #1e1c14 100%);
}

/* --- Finding (purple) card --- */

html.dark .mod-card--finding {
    background: #1a1624;
    border-color: rgba(126, 87, 194, 0.2);
    box-shadow: 0 14px 34px rgba(126, 87, 194, 0.06);
}

html.dark .mod-card--finding::before {
    box-shadow: inset 0 0 0 1px rgba(126, 87, 194, 0.12);
}

html.dark .mod-card--finding .mod-card__img-wrap {
    background: linear-gradient(135deg, #221a34 0%, #1a1624 100%);
}

/* --- Badge newyear / trending --- */

html.dark .mod-card__badge--trending {
    background: rgba(42, 28, 12, 0.96);
    border-color: #5c3a14;
    color: #f97316;
}

/* ═══════════════════════════════════════════════════════
   DARK THEME — FILTER BAR, SEARCH, DROPDOWNS
   ═══════════════════════════════════════════════════════ */

html.dark .mods-arc-filter-bar.arc-filter-bar {
    background: #1a1d27;
    border-color: #2a2d3a;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* --- Search --- */

html.dark .arc-search {
    background: #22252f;
    border-color: #2a2d3a;
}

html.dark .arc-search:hover {
    background: #22252f;
}

html.dark .arc-search:focus-within {
    box-shadow: 0 0 0 4px rgba(79, 107, 255, 0.12);
}

html.dark .arc-search__input {
    color: #d1d5e0;
}

html.dark .arc-search__input::placeholder {
    color: #6b7288;
}

/* --- Select --- */

/* --- Category dropdown --- */

html.dark .mods-cat-dropdown__toggle {
    background: #22252f;
    border-color: #2a2d3a;
    color: #d1d5e0;
}

html.dark .mods-cat-dropdown__toggle:hover {
    border-color: #3a3d4a;
}

html.dark .mods-cat-dropdown__toggle-text {
    color: #d1d5e0;
}

html.dark .mods-cat-dropdown__chevron::before,
html.dark .mods-cat-dropdown__chevron::after {
    background: #6b7288;
}

html.dark .mods-cat-dropdown__panel {
    background: #1a1d27;
    border-color: #2a2d3a;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

html.dark .mods-cat-dropdown__search-wrap {
    border-bottom-color: #2a2d3a;
}

html.dark .mods-cat-dropdown__search {
    background: #22252f;
    border-color: #2a2d3a;
    color: #d1d5e0;
}

html.dark .mods-cat-dropdown__search:focus {
    border-color: #4a5080;
}

html.dark .mods-cat-dropdown__item {
    color: #d1d5e0;
}

html.dark .mods-cat-dropdown__item:hover {
    background: #22252f;
}

html.dark .mods-cat-dropdown__item.is-active {
    background: #1e2240;
    color: #83bbff;
}

html.dark .mods-cat-dropdown__item.is-active .mods-cat-dropdown__count {
    color: #83bbff;
}

html.dark .mods-cat-dropdown__count {
    color: #6b7288;
}

/* --- Sort dropdown --- */

html.dark .mods-sort-dropdown__toggle {
    background: #22252f;
    border-color: #2a2d3a;
    color: #d1d5e0;
}

html.dark .mods-sort-dropdown__toggle:hover {
    border-color: #3a3d4a;
}

html.dark .mods-sort-dropdown__toggle-text {
    color: #d1d5e0;
}

html.dark .mods-sort-dropdown__chevron::before,
html.dark .mods-sort-dropdown__chevron::after {
    background: #6b7288;
}

html.dark .mods-sort-dropdown__panel {
    background: #1a1d27;
    border-color: #2a2d3a;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

html.dark .mods-sort-dropdown__item {
    color: #d1d5e0;
}

html.dark .mods-sort-dropdown__item:hover {
    background: #22252f;
}

html.dark .mods-sort-dropdown__item.is-active {
    background: #1e2240;
    color: #83bbff;
}

/* --- Filter reset --- */

html.dark .mods-filter-reset {
    background: #22252f;
    border-color: #2a2d3a;
    color: #8b90a0;
}

html.dark .mods-filter-reset:hover {
    color: #d1d5e0;
    border-color: #3a3d4a;
    background: #282b36;
}

html.dark .mods-filter-reset--disabled {
    color: #565a68;
    border-color: #24262f;
    background: #1c1e26;
}

html.dark .mods-filter-reset--disabled:hover {
    color: #565a68;
    border-color: #24262f;
    background: #1c1e26;
}