/* ==========================================================================
   Дизайн-система. Структура и метрики повторяют раскладку референса,
   палитра и типографика — собственные.
   ========================================================================== */

:root {
    /* Фирменные цвета */
    --secondary-color:      #143c5a; /* тёмно-синий: шапка, тёмные панели, шапки таблиц */
    --secondary-hover:      #1d5077;
    --primary-color:        #12905c; /* зелёный: CTA, акценты, активные состояния */
    --primary-hover:        #0e7549;
    --accent-color:         #f4a020; /* янтарный: бейджи, звёзды рейтинга */
    --conversion-color:     #12905c;

    /* Поверхности */
    --background-color:     #f3f7fa;
    --card-bg:              #ffffff;
    --panel-soft:           #f2f8f5;

    /* Текст */
    --text-color:           #2b3440;
    --text-light:           #5b6775;
    --text-muted:           #8a95a3;
    --white-color:          #ffffff;
    --black-background:     #2b3440;

    /* Служебные */
    --border-color:         #e2e8f0;
    --shadow-color:         rgba(16, 33, 51, 0.10);
    --error-color:          #d64545;
    --success-color:        #21a366;
    --star-color:           #f4a020;

    /* Подвал */
    --footer-background:    #1b1f24;
    --footer-color:         #d9dee4;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Кириллица и латиница разделены по unicode-range: браузер качает только нужное */
@font-face {
    font-family: 'PT Sans';
    src: url('/fonts/pt-sans-700-cyrillic.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'PT Sans';
    src: url('/fonts/pt-sans-700-latin.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'PT Sans Narrow';
    src: url('/fonts/pt-sans-narrow-400-cyrillic.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'PT Sans Narrow';
    src: url('/fonts/pt-sans-narrow-400-latin.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'PT Sans Narrow';
    src: url('/fonts/pt-sans-narrow-700-cyrillic.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'PT Sans Narrow';
    src: url('/fonts/pt-sans-narrow-700-latin.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Roboto';
    src: url('/fonts/roboto-400-cyrillic.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Roboto';
    src: url('/fonts/roboto-400-latin.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Roboto';
    src: url('/fonts/roboto-500-cyrillic.woff2') format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Roboto';
    src: url('/fonts/roboto-500-latin.woff2') format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

body {
    font-family: 'Roboto', -apple-system, Arial, sans-serif;
    line-height: 1.7;
    background-color: var(--background-color);
    color: var(--text-color);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-weight: 700;
    font-family: 'PT Sans', Georgia, serif;
    margin: 0;
    line-height: 1.25;
}
h1, .h1 { font-size: 2em; }
h2, .h2 { font-size: 1.5em; display: block; }
h3, .h3 { font-size: 1.17em; display: block; }

a { color: var(--secondary-color); }
p  { font-size: 1rem; line-height: 1.6; }

/* Утилиты отступов — те же имена, что у референса */
.m1 { margin-bottom: 1rem; }
.m2 { margin-bottom: 2rem; }
.white-background { background-color: var(--white-color); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* --- Кнопки --- */
.button {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 3px 8px var(--shadow-color);
    transition: background-color .25s ease, transform .2s ease;
    touch-action: manipulation;
}
.button:hover { background-color: var(--primary-hover); transform: translateY(-2px); }
.button-accent { background-color: var(--accent-color); }
.button-disabled { background-color: var(--border-color); cursor: not-allowed; box-shadow: none; }
.button-info {
    padding: 0.8rem 1.6rem;
    background-color: #eef2f6;
    background-image: url('/images/ui/info.svg');
    background-repeat: no-repeat;
    background-position: center;
    border: none; border-radius: 8px;
    font-size: 1rem; cursor: pointer;
    box-shadow: 0 3px 8px var(--shadow-color);
    transition: background-color .25s ease;
}
.button-info:hover { background-color: var(--border-color); }

/* --- Шапка --- */
.header-wrap { background: var(--secondary-color); }
.header { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; }
.header .logo { display: block; text-decoration: none; }
.header .logo img { height: 50px; margin-right: 1px; vertical-align: top; }
.header .logo span.logo-text {
    color: var(--white-color);
    line-height: 50px;
    vertical-align: top;
    display: inline-block;
    font-family: 'PT Sans Narrow', 'Arial Narrow', sans-serif;
    font-weight: 400;
    font-size: 1.4rem;
    letter-spacing: .03em;
    margin-left: 5px;
}
.header .menu { display: flex; align-items: center; }
.header .menu ul { list-style: none; display: flex; margin: 0; padding: 0; }
.header .menu li { margin-left: 20px; }
.header .menu li a { color: #fff; text-decoration: none; }
.header .menu li a:hover,
.header .menu li .active { color: var(--accent-color); }
.header .menu-toggle { display: none; }

@media (max-width: 992px) {
    .header .menu ul { display: none; flex-direction: column; }
    .header .menu.active {
        position: absolute; top: 68px; left: 0; width: 100%;
        height: calc(100% - 68px); background: var(--secondary-color);
        align-items: baseline; z-index: 11111;
    }
    .header .menu.active ul { display: flex; width: 100%; text-align: center; }
    .header .menu.active li { margin: 0; }
    .header .menu.active li a { display: block; padding: 20px 0; margin: 0; }
    .header .menu-toggle { display: block; border: none; padding: 10px; cursor: pointer; background: none; }
}

/* --- Хлебные крошки --- */
.breadcrumbs {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 4px 8px; line-height: 1.4; font-size: 15px;
    font-family: 'PT Sans', serif;
}
.breadcrumbs a { display: inline-flex; align-items: center; white-space: nowrap; flex-shrink: 0; text-decoration: none; color: var(--secondary-color); }
.breadcrumbs a:hover { color: var(--primary-color); }
.breadcrumbs .current { color: var(--text-muted); }
@media (max-width: 768px) {
    .breadcrumbs { font-size: 14px; gap: 4px 6px; }
    .breadcrumbs .current { flex: 0 0 100%; margin-top: 2px; }
}

/* --- Лид --- */
.lead .lead-text { margin-top: .6rem; color: var(--text-light); }

/* --- Калькулятор подбора --- */
.filter-loan {
    background: var(--secondary-color);
    border-radius: 12px; padding: 1rem;
    box-shadow: 0 4px 10px var(--shadow-color);
}
.filter-loan .h2 { text-align: center; color: #fff; }
.filter-loan label { color: #fff; display: block; }
.filter-loan .filter-items-wrap { display: flex; gap: 12px; }
.filter-loan .filter-item { margin-bottom: 12px; flex: 0 0 calc(50% - 6px); }
.filter-loan .inputs-wrap { position: relative; }
.filter-loan input { padding: 1rem; border: none; border-radius: 4px; font-family: inherit; font-size: 1rem; }
.filter-loan input[type="number"] { width: 100%; text-align: left; padding-left: 4rem; margin: 0; }
.filter-loan input[type="range"] {
    position: absolute; bottom: -23px; left: -10px; width: 100%;
    margin-left: 10px; outline: none; border: 0;
    --c: var(--primary-color); --l: 5px; --s: 25px;
    height: var(--s); -webkit-appearance: none; appearance: none;
    background: none; cursor: pointer; overflow: hidden;
}
.filter-loan input[type="range"]::-webkit-slider-thumb {
    height: var(--s); aspect-ratio: 1; border-radius: 50%;
    box-shadow: 0 0 0 var(--l) inset var(--c);
    border-image: linear-gradient(90deg, var(--c) 50%, #fff 0) 0 1/calc(50% - var(--l)/2) 100vw/0 calc(100vw + 8px);
    -webkit-appearance: none; appearance: none;
}
.filter-loan input[type="range"]::-moz-range-thumb {
    height: var(--s); width: var(--s); background: none; border-radius: 50%;
    box-shadow: 0 0 0 var(--l) inset var(--c);
    border-image: linear-gradient(90deg, var(--c) 50%, #fff 0) 0 1/calc(50% - var(--l)/2) 100vw/0 calc(100vw + 8px);
    -moz-appearance: none; appearance: none;
}
.filter-loan .filter-button {
    position: absolute; top: 3px;
    background-color: var(--border-color); color: #000;
    border: none; padding: 1rem; cursor: pointer; border-radius: 4px;
    font-size: 1rem; line-height: 1; touch-action: manipulation;
}
.filter-loan .filter-button.btn-minus { left: 3px; }
.filter-loan .filter-button.btn-plus  { right: 3px; }
.filter-loan .filter-button:hover { background-color: var(--secondary-hover); color: #fff; }
.filter-loan .interest-free-loan { display: flex; gap: 6px; margin-top: 6px; color: #fff; }
.filter-loan .interest-free-loan input { padding: 0; width: 24px; height: 24px; border-radius: 5px; }
.filter-loan input[type='checkbox'] { accent-color: var(--primary-color); }
.filter-loan .result-wrap { background: var(--panel-soft); padding: 5px; border-radius: 5px; margin-top: 10px; }
.filter-loan .result {
    border: 2px dotted var(--secondary-color);
    display: flex; gap: 4px; align-items: center;
    padding: 5px; justify-content: space-between;
}
.filter-loan .result-title { color: var(--text-light); font-size: 14px; }
.filter-loan .result-value { font-size: 18px; display: flex; align-items: center; gap: 4px; }
.filter-loan .button-wrap { text-align: center; }
@media (max-width: 992px) {
    .filter-loan .filter-items-wrap { flex-direction: column; }
    .filter-loan .result { flex-wrap: wrap; }
    .filter-loan .result .result-item { flex: 1; min-width: 100px; }
    .filter-loan .result .button-wrap { flex-basis: 100%; }
    .filter-loan .result .button-wrap button { width: 100%; }
}

/* --- Сортировка --- */
.sort-module { display: flex; gap: 3px; align-items: center; }
.sort-module .sorting-info { margin-right: 5px; }
.sort-module .dropdown { position: relative; display: inline-block; }
.sort-module .dropbtn {
    background: transparent; border: none; outline: 0; cursor: pointer;
    text-decoration: underline; font: inherit; color: inherit;
}
.sort-module .dropdown-content {
    display: none; position: absolute; background-color: #fff;
    min-width: 200px; box-shadow: 0 8px 16px rgba(0,0,0,.2);
    z-index: 10; border-radius: 12px; overflow: hidden;
}
.sort-module .dropdown:hover .dropdown-content { display: block; }
.sort-module .dropdown-content span { padding: 12px 16px; cursor: pointer; display: block; }
.sort-module .dropdown-content span:hover { background-color: #f1f1f1; }
.sort-module .dropdown-content span.active { background-color: var(--primary-color); color: #fff; }

/* --- Карточка МФО --- */
.card {
    background-color: var(--card-bg);
    border-radius: 12px; padding: 1.5rem;
    box-shadow: 0 4px 10px var(--shadow-color);
    transition: transform .3s ease, box-shadow .3s ease;
    min-width: 280px;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 18px var(--shadow-color); }
.card .card-header { display: flex; gap: 5px; align-items: center; margin-bottom: 1rem; }
.card .card-logo {
    /* Логотипы у партнёрки разной формы: есть квадратные иконки, есть широкие
       надписи. Фиксируем высоту и даём запас по ширине — тогда широкие
       остаются читаемыми, а квадратные не раздуваются. */
    height: 40px;
    width: auto;
    max-width: 80px;
    object-fit: contain;
    object-position: left center;
    border-radius: 6px;
    flex-shrink: 0;
}
.card .card-title {
    font-size: 1.1rem;
    font-family: 'PT Sans', serif;
    font-weight: 700;
    line-height: 1.2;
    min-width: 0;
    overflow-wrap: anywhere;
}
.card .card-label {
    display: inline-block; padding: 2px 5px; margin: auto;
    border-radius: 5px; background: var(--accent-color);
    font-size: .8rem; color: #fff;
}
.card .space-for-label { display: inline-block; padding: 2px 5px; height: 25px; width: 1px; }
.card .card-content { font-size: 1rem; color: var(--text-light); margin-bottom: .8rem; }
.card .card-content span { font-weight: 700; color: var(--black-background); float: right; }
.card .buttons-wrap { display: flex; gap: 5px; }
.card .buttons-wrap .button { width: 100%; }

.listing-page .cards-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.listing-page .cards-wrap .card { flex: 0 0 calc(25% - 8px); }
@media (max-width: 992px) { .listing-page .cards-wrap { justify-content: center; } }
@media (max-width: 640px) {
    .card { padding: .66rem; min-width: calc(50% - 4px); }
    .listing-page .cards-wrap .card { flex: 0 0 calc(50% - 4px); }
    .card .card-title { font-size: 1rem; }
    .card .card-header { margin-bottom: .5rem; }
    .card .card-label { font-size: .7rem; margin-bottom: 5px; }
    .card .card-content { font-size: .85rem; }
    .button, .button-info { padding: .5rem .8rem; font-size: .9rem; }
}
@media (max-width: 480px) {
    .cards-wrap .card { text-align: center; }
    .card .card-header { display: block; text-align: center; }
    .card .card-content { text-align: left; }
    .card .buttons-wrap { flex-direction: column; gap: 12px; clear: both; margin-top: 24px; }
    .card .buttons-wrap .button, .card .buttons-wrap .button-info { width: 100%; min-height: 28px; }
}

/* --- Экспертное мнение (E-E-A-T) --- */
.expert-opinion {
    background: var(--card-bg); border-radius: 12px; padding: 1.5rem;
    box-shadow: 0 4px 10px var(--shadow-color);
    border-left: 4px solid var(--primary-color);
}
.expert-opinion .opinion-content { line-height: 1.6; }
.expert-opinion .expert-info { display: flex; align-items: center; margin: 15px 0; }
.expert-opinion .expert-photo { width: 50px; height: 50px; border-radius: 50%; margin-right: 15px; }
.expert-opinion .expert-details .h3 { margin: 0; font-size: 18px; }
.expert-opinion .expert-details span { margin: 0; color: var(--text-light); display: block; font-size: .9rem; }

/* --- Таблицы --- */
table {
    width: 100%; border-collapse: collapse;
    background-color: var(--card-bg); border-radius: 12px;
    overflow: hidden; box-shadow: 0 4px 10px var(--shadow-color);
}
table th, table td { padding: 1.2rem; text-align: left; }
table:not(.vertical-table) th { background-color: var(--secondary-color); color: #fff; font-weight: 600; }
table tr:nth-child(even) { background-color: var(--background-color); }

.table-total-compare th { cursor: pointer; }
.table-total-compare .table-scroll-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-total-compare .table-scroll-wrap table { min-width: 560px; }
.table-total-compare .pagination { margin-top: 20px; text-align: center; }
.table-total-compare .page-button {
    padding: 10px 15px; margin: 0 5px; cursor: pointer; border-radius: 5px;
    border: 1px solid var(--secondary-color); background-color: #fff;
    color: var(--secondary-color); transition: background-color .3s, color .3s;
}
.table-total-compare .page-button:hover,
.table-total-compare .page-button.active { background-color: var(--secondary-color); color: #fff; }

/* --- Отзывы (горизонтальная лента) --- */
.scroll-container-wrap { position: relative; }
.scroll-container .arrows { display: flex; gap: 6px; justify-content: flex-end; margin-bottom: 6px; }
.scroll-container .arrow {
    border: 1px solid var(--border-color); background: #fff;
    border-radius: 50%; width: 34px; height: 34px; cursor: pointer;
}
.scroll-container .arrow:hover { background: var(--border-color); }
.reviews { display: flex; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; }
.reviews::-webkit-scrollbar { display: none; }
.reviews .review-item {
    width: 300px; padding: 15px; margin-right: 15px; flex-shrink: 0;
    border-radius: 12px; background-color: var(--card-bg);
    box-shadow: 0 4px 10px var(--shadow-color);
}
.reviews .review-item:last-child { margin-right: 0; }
.reviews .review-header { display: flex; justify-content: space-between; align-items: center; }
.reviews .company-name { font-weight: 500; text-decoration: none; }
.reviews .company-logo {
    width: 44px; height: 44px; object-fit: contain;
    float: left; margin: 0 15px 5px 0;
    border-radius: 7px; border: 1px solid #eee; background: #fff;
}
.reviews .review-rating { margin-bottom: 15px; line-height: 1; }
.reviews .review-rating .rating-icon {
    width: 16px; height: 16px; display: inline-block; margin-right: 3px;
    background: url('/images/ui/star.svg') no-repeat; background-size: contain; vertical-align: -1px;
}
.reviews .review-content { display: flex; flex-direction: column; }
.reviews .review-text { max-height: 200px; overflow-y: auto; }
.reviews .review-author { font-style: italic; color: var(--text-light); font-size: .8rem; }
.link-to-reviews { margin-top: 10px; display: inline-block; }

/* --- Контент и аккордеоны FAQ --- */
.content { background: var(--card-bg); border-radius: 12px; padding: 1.5rem; box-shadow: 0 4px 10px var(--shadow-color); }
.content h2 { margin-top: 1.5rem; }
.content h2:first-child { margin-top: 0; }
.content p, .content ul, .content ol { margin-bottom: .8rem; }
.content ul, .content ol { padding-left: 1.4rem; }
.content li { margin-bottom: .4rem; }
@media (max-width: 992px) { .content { padding: 1rem; } }

.accordion {
    border: 1px solid var(--border-color);
    display: flex; flex-direction: column;
    border-radius: 8px; list-style: none;
}
.accordion + .accordion { margin-top: 16px; }
.accordion summary {
    display: flex; align-items: center; justify-content: space-between;
    cursor: pointer; padding: 1rem; list-style: none;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::marker { content: ""; display: none; }
.accordion summary h3, .accordion summary span {
    display: inline-block; font-size: 1.17em; font-weight: 700; margin: 0;
}
.accordion summary:hover { background-color: var(--secondary-color); color: #fff; border-radius: 8px; }
.accordion[open] summary:hover { border-bottom-right-radius: 0; border-bottom-left-radius: 0; }
.accordion summary:hover .icon svg path { stroke: #fff; }
.accordion summary .icon { display: flex; align-items: center; }
.accordion .accordion-body { padding: 1rem; border-top: 1px solid var(--border-color); }
.accordion summary .close-icon, .accordion[open] summary .open-icon { display: none; }
.accordion[open] summary .close-icon, .accordion summary .open-icon { display: block; }
@media (max-width: 992px) { .accordion summary h3, .accordion summary span { line-height: 1.3; font-size: 1rem; } }

/* --- Оценка страницы --- */
.rating { display: flex; flex-direction: column; align-items: center; line-height: 1.3; }
.rating .rating-stars { display: flex; font-size: 24px; color: #ccc; cursor: pointer; }
.rating .rating-stars .star { margin: 0 2px; }
.rating .rating-stars .star.full { color: var(--star-color); }
.rating .rating-info { font-size: 1rem; color: var(--secondary-color); }
.rating .rating-info .rating-value { margin-right: 5px; margin-top: 5px; display: inline-block; }
@media (max-width: 768px) { .rating .rating-stars { font-size: 20px; } .rating .rating-info { font-size: 14px; } }

/* --- Перелинковка --- */
.relink .group-wrap { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.relink .group-wrap::-webkit-scrollbar { display: none; }
.relink .group { min-width: 300px; }
.relink .group li { list-style-type: none; }
.relink .group li a { color: var(--secondary-color); text-decoration: none; }
.relink .group li a:hover { color: var(--primary-color); text-decoration: underline; }

/* --- Модалка карточки --- */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.5); z-index: 1000;
}
.modal-overlay.open { display: block; }
.modal {
    display: none; position: fixed; z-index: 1001;
    top: 50%; left: 50%; transform: translate(-50%,-50%);
    width: min(680px, calc(100% - 2rem)); max-height: 85vh; overflow-y: auto;
    background: #fff; border-radius: 12px; padding: 2rem;
}
.modal.open { display: block; }
.modal .card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.modal .card-header-logo-wrap { display: flex; align-items: center; gap: 8px; font-size: 1.2rem; font-weight: 700; }
.modal .card-logo { width: 64px; height: 64px; object-fit: contain; }
.modal .piece-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.modal .button-wrap {
    position: sticky; bottom: -2rem; display: flex;
    justify-content: space-between; align-items: center;
    background: #fff; border-top: 1px solid #eee;
    padding: 1rem; margin: 0 -2rem -2rem;
}
.modal .modal-close { background: none; border: none; font-size: 1.6rem; cursor: pointer; line-height: 1; }
@media (max-width: 992px) { .modal { padding: 1rem; } .modal .button-wrap { margin: 0 -1rem -1rem; bottom: -1rem; } }
@media (max-width: 576px) { .modal .piece-wrap { grid-template-columns: 1fr; } }

/* --- Подвал --- */
.footer {
    background-color: var(--footer-background);
    padding: 30px 0; text-align: center; font-size: 14px;
    color: var(--footer-color);
    display: flex; flex-direction: column; gap: 8px; justify-content: center;
}
.footer .footer-links { display: flex; gap: 10px; margin: auto; flex-wrap: wrap; justify-content: center; }
.footer a { color: var(--footer-color); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer .footer-legal { font-size: 12px; color: var(--text-muted); max-width: 900px; margin: 0 auto; padding: 0 15px; }

/* --- Cookie --- */
.cookie-consent {
    position: fixed; left: 50%; transform: translateX(-50%); bottom: 20px;
    max-width: 760px; width: calc(100% - 24px);
    background: #fff; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.18);
    z-index: 900;
}
.cookie-consent.hidden { display: none; }
.cookie-consent__content { display: flex; gap: 12px; align-items: center; padding: 14px 18px; }
.cookie-consent__text { font-size: 14px; line-height: 1.4; }
.cookie-consent__link { color: var(--primary-color); }
.cookie-consent__button { flex-shrink: 0; }
@media (max-width: 768px) {
    .cookie-consent { left: 12px; right: 12px; bottom: 12px; transform: none; width: auto; }
    .cookie-consent__content { flex-direction: column; align-items: stretch; }
}

/* --- Маркировка рекламы --- */
.ad-marking {
    margin-top: .8rem;
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-muted);
}
