/* =====================================================================
 * mfo.css — SEO-раздел «Каталог МФО»
 * Mobile-first: базовые стили для узкого экрана, медиазапросы вверх.
 * Опирается на переменные и кнопки из style.css; своих цветов задаёт минимум.
 * Создано 2026-08-17.
 * ===================================================================== */

.mfo { padding: 16px 0 48px; }
.mfo h1 { font-size: 24px; line-height: 1.25; margin: 8px 0 12px; }
.mfo h2 { font-size: 20px; line-height: 1.3; margin: 28px 0 10px; }
.mfo h3 { font-size: 17px; line-height: 1.35; margin: 20px 0 8px; }
.mfo p { line-height: 1.6; margin: 0 0 12px; }
.mfo a { color: #1f6feb; }
.mfo__lead, .lead { font-size: 16px; color: #4a5260; }

/* --- Крошки ---------------------------------------------------------- */
.crumbs { margin: 4px 0 8px; font-size: 13px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.crumbs li + li::before { content: "→"; margin-right: 6px; color: #9aa3b2; }
.crumbs a { color: #6b7480; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { color: #9aa3b2; }

/* --- Фильтры каталога ------------------------------------------------ */
.mfo-filters { background: #f6f8fb; border: 1px solid #e6ebf2; border-radius: 14px; padding: 12px; margin: 14px 0 20px; }
.mfo-filters__search { display: flex; gap: 8px; }
.mfo-filters__search input { flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid #d8e0ea; border-radius: 10px; font-size: 15px; }
.mfo-filters__row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; align-items: end; }
.mfo-filters__row label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #6b7480; }
.mfo-filters__row select { padding: 10px 12px; border: 1px solid #d8e0ea; border-radius: 10px; font-size: 14px; background: #fff; }
.mfo-filters__check { flex-direction: row !important; align-items: center; gap: 8px !important; padding-bottom: 10px; }
.mfo-filters__reset { align-self: center; font-size: 13px; color: #6b7480; }

/* --- Список МФО: строка-справочник организации (эталон everfin) ------- */
.mfo-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }

.mfo-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 22px 16px 16px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.mfo-row:hover { border-color: #cbd5e1; box-shadow: 0 2px 12px rgba(15,23,42,.05); }

/* Бейдж возраста организации */
.mfo-row__age {
  position: absolute; top: -12px; left: 16px;
  font-size: 11px; font-weight: 700; line-height: 1.4;
  border-radius: 999px; padding: 4px 12px; letter-spacing: .03em; white-space: nowrap;
}
.mfo-row__age--new { color: #065f46; background: #d1fae5; border: 1.5px solid #6ee7b7; }
.mfo-row__age--age { color: #475569; background: #f1f5f9; border: 1.5px solid #cbd5e1; }

/* Логотип */
.mfo-row__logo { display: flex; align-items: center; min-height: 44px; }
.mfo-row__logo img { max-width: 150px; max-height: 46px; width: auto; height: auto; object-fit: contain; display: block; }
.mfo-row__logoFb {
  width: 44px; height: 44px; border-radius: 10px; background: #e2e8f0;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; color: #64748b;
}

/* Название и чипы */
.mfo-row__info { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mfo-row__name { font-size: 18px; font-weight: 700; color: #0f172a; line-height: 1.25; }
.mfo-row__name a { color: #0f172a; text-decoration: none; }
.mfo-row__name a:hover { text-decoration: underline; }
.mfo-row__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mfo-chip {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  border-radius: 999px; padding: 4px 10px; background: #eef4ff; color: #1f6feb; white-space: nowrap;
}
.mfo-chip--gos { background: #eafaf0; color: #12805a; }
.mfo-chip--link { background: #f1f5f9; color: #334155; text-decoration: none; }
.mfo-chip--link:hover { background: #e2e8f0; }

/* Реквизиты организации */
.mfo-row__org { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mfo-row__orgRow { display: flex; gap: 8px; align-items: baseline; min-width: 0; font-size: 13px; }
.mfo-row__orgLabel { flex: 0 0 78px; color: #94a3b8; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.mfo-row__orgVal { font-weight: 600; color: #0f172a; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mfo-row__orgVal--muted { color: #64748b; font-weight: 500; }
.mfo-row__orgLink { font-weight: 600; color: #1f6feb; text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
.mfo-row__orgLink:hover { text-decoration: underline; }

/* Кнопка */
.mfo-row__cta { display: flex; }
.mfo-row__btn {
  display: block; width: 100%; text-align: center;
  padding: 13px 22px; border-radius: 10px;
  background: #ffd400; color: #14161a;
  font-size: 15px; font-weight: 700; text-decoration: none;
  border: 1px solid #ffd400;
}
.mfo-row__btn:hover, .mfo-row__btn:focus { background: #ffdf3d; border-color: #ffdf3d; }
.mfo-row__btn--offer { background: #fff; color: #14161a; border-color: #d8e0ea; }
.mfo-row__btn--offer:hover { background: #f6f8fb; border-color: #cbd5e1; }

/* --- Плитки навигации между разделами бренда (эталон everfin) --------- */
.brand-tiles { margin: 28px 0; padding: 20px 16px; background: #f7f8fa; border-radius: 16px; }
.brand-tiles__title { font-size: 20px; margin: 0 0 6px; }
.brand-tiles__sub { margin: 0 0 16px; font-size: 14px; color: #64748b; }
.brand-tiles__grid { display: grid; gap: 10px; }
.brand-tile {
  display: grid; grid-template-columns: 40px 1fr 20px; align-items: center; gap: 12px;
  padding: 14px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  text-decoration: none; color: #0f172a;
}
.brand-tile:hover { border-color: #ffd400; box-shadow: 0 2px 10px rgba(15,23,42,.06); }
.brand-tile__ico { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: #fff8dc; color: #8a6d00; }
.brand-tile__ico svg { width: 22px; height: 22px; }
.brand-tile__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.brand-tile__name { font-weight: 700; font-size: 15px; }
.brand-tile__desc { font-size: 13px; color: #64748b; line-height: 1.4; }
.brand-tile__arr { color: #94a3b8; }
.brand-tile__arr svg { width: 18px; height: 18px; display: block; }
.brand-tiles__all { margin: 14px 0 0; font-size: 14px; }

/* --- Пагинация ------------------------------------------------------- */
.mfo-pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 24px 0; font-size: 14px; }
.mfo-pager__pos { color: #8a93a1; }

.mfo__empty { padding: 24px; text-align: center; background: #f6f8fb; border-radius: 14px; }

/* --- Карточка бренда: первый экран ----------------------------------- */
.brand-hero { border: 1px solid #e6ebf2; border-radius: 16px; padding: 16px; margin: 12px 0 18px; background: #fff; }
.brand-hero__head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.brand-hero__logo { object-fit: contain; max-width: 140px; height: 48px; }
.brand-hero__head h1 { margin: 0; }
.brand-hero__reestr { font-size: 13px; color: #12805a; margin-top: 4px; }
.brand-hero__lead { margin-top: 12px; }

.brand-specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 14px 0; }
.brand-specs dt { font-size: 12px; color: #8a93a1; }
.brand-specs dd { margin: 2px 0 0; font-size: 16px; font-weight: 600; }

/* --- CTA -------------------------------------------------------------- */
.cta { margin: 18px 0; }
.cta .btn { width: 100%; }
.cta__note { font-size: 13px; color: #8a93a1; margin-top: 8px; text-align: center; }

/* --- Быстрый ответ (вход в ЛК) --------------------------------------- */
.quick-answer { border: 1px solid #cfe0ff; background: #f4f8ff; border-radius: 16px; padding: 16px; margin: 14px 0 20px; }
.quick-answer__title { font-weight: 600; font-size: 17px; margin-bottom: 12px; }
.quick-answer .btn { width: 100%; }
.quick-answer__note { font-size: 13px; color: #6b7480; margin-top: 10px; }

/* --- Навигация по подстраницам бренда -------------------------------- */
.brand-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.brand-nav a { font-size: 14px; text-decoration: none; border: 1px solid #d8e0ea; border-radius: 999px; padding: 8px 14px; color: #2b3440; }
.brand-nav a:hover { border-color: #1f6feb; color: #1f6feb; }

/* --- Контент: блоки из jsonb ----------------------------------------- */
.content { font-size: 16px; }
.content .ul, .content .steps { padding-left: 20px; margin: 0 0 14px; }
.content .ul li, .content .steps li { margin-bottom: 8px; line-height: 1.55; }

.short { background: #f6f8fb; border-left: 3px solid #1f6feb; border-radius: 0 12px 12px 0; padding: 14px 16px; margin: 16px 0; }
.short__title { font-weight: 600; margin-bottom: 8px; }
.short ul { padding-left: 18px; margin: 0; }
.short li { margin-bottom: 6px; }

.note { background: #f6f8fb; border-radius: 12px; padding: 12px 14px; margin: 16px 0; font-size: 15px; }
.warn { background: #fff6ed; border: 1px solid #ffd9b0; border-radius: 12px; padding: 12px 14px; margin: 16px 0; font-size: 15px; }

.table-wrap { overflow-x: auto; margin: 16px 0; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th, .tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #e6ebf2; vertical-align: top; }
.tbl th { color: #6b7480; font-weight: 600; white-space: nowrap; }

.fig { margin: 16px 0; }
.fig img { width: 100%; height: auto; border: 1px solid #e6ebf2; border-radius: 12px; }
.fig figcaption { font-size: 13px; color: #8a93a1; margin-top: 6px; }

/* --- Реквизиты -------------------------------------------------------- */
.requisites { margin: 28px 0; }

/* --- Витрина офферов -------------------------------------------------- */
.showcase { margin: 32px 0; }
.showcase__lead { color: #6b7480; font-size: 15px; }
.showcase__list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.showcase__item { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "logo btn" "name btn" "spec btn"; align-items: center; gap: 4px 12px; border: 1px solid #e6ebf2; border-radius: 12px; padding: 12px; }
.showcase__item img { grid-area: logo; object-fit: contain; max-width: 100px; height: 30px; }
.showcase__name { grid-area: name; font-weight: 600; }
.showcase__spec { grid-area: spec; font-size: 13px; color: #8a93a1; }
.showcase__item .btn { grid-area: btn; }
.showcase__note { font-size: 12px; color: #9aa3b2; margin-top: 10px; }

/* --- FAQ -------------------------------------------------------------- */
.faq { margin: 32px 0; }
.faq__item { border-bottom: 1px solid #e6ebf2; padding: 12px 0; }
.faq__item summary { cursor: pointer; font-weight: 600; font-size: 16px; }
.faq__answer { margin-top: 8px; line-height: 1.6; }

/* --- Похожие / соседние ---------------------------------------------- */
.related__list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.related__list a { display: flex; align-items: center; gap: 8px; text-decoration: none; border: 1px solid #e6ebf2; border-radius: 12px; padding: 10px; color: #2b3440; font-size: 14px; }
.related__list img { object-fit: contain; max-width: 90px; height: 30px; }

.siblings { margin: 28px 0; }
.siblings__list { padding-left: 20px; }
.siblings__list li { margin-bottom: 8px; }

/* --- Подвал страницы -------------------------------------------------- */
.page-meta { margin-top: 32px; padding-top: 16px; border-top: 1px solid #e6ebf2; }
.page-meta__date { font-size: 13px; color: #8a93a1; margin-bottom: 8px; }
.mfo__disclaimer { font-size: 13px; color: #8a93a1; line-height: 1.5; }
.mfo__note { margin-top: 32px; }

.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-outline { background: #fff; border: 1px solid #d8e0ea; color: #2b3440; padding: 10px 16px; border-radius: 10px; cursor: pointer; }

/* =====================================================================
 * Планшет и десктоп
 * ===================================================================== */
@media (min-width: 640px) {
  .mfo h1 { font-size: 30px; }
  .mfo h2 { font-size: 23px; }
  .brand-specs { grid-template-columns: repeat(4, 1fr); }
  .cta .btn, .quick-answer .btn { width: auto; min-width: 280px; }
  .cta__note { text-align: left; }
  .mfo-row {
    grid-template-columns: 160px minmax(180px, 1fr) minmax(200px, 1.2fr) minmax(190px, 1fr) 170px;
    gap: 0 16px;
    align-items: center;
    padding: 22px 24px;
  }
  .mfo-row__age { left: 20px; }
  .mfo-row__btn { padding: 12px 18px; font-size: 14px; }
  .brand-tiles { padding: 24px; }
  .brand-tiles__grid { grid-template-columns: repeat(2, 1fr); }
  .showcase__list { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .mfo-list { gap: 14px; }
  .related__list { grid-template-columns: repeat(4, 1fr); }
  .showcase__list { grid-template-columns: repeat(4, 1fr); }
  .showcase__item { grid-template-columns: 1fr; grid-template-areas: "logo" "name" "spec" "btn"; text-align: center; justify-items: center; gap: 8px; }
}
