/* ==========================================================================
   МФО: каталог /rus/mfo/, /kz/mfo/ (views/mfos.php) и страница МФО (views/mfo.php).
   Основа — стили страниц банков (banks-hub.css): шапка, вкладки, колонки, таблицы, FAQ.
   ========================================================================== */

.mf .bk-stat__change {
  font-weight: 500;
  color: var(--c-muted);
}

.mf .bk-stat__value {
  overflow-wrap: anywhere;
}

/* -------- Логотип или плашка с инициалами -------- */
.mf-logo {
  display: grid;
  place-items: center;
  flex: none;
  width: 3.25rem;
  height: 3.25rem;
  padding: 0.375rem;
  overflow: hidden;
  background: #fff;
  border: 0.0625rem solid var(--c-line);
  border-radius: 0.75rem;
}

.mf-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.mf-logo--ini,
.mf-plogo--ini {
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--tone-fg, var(--c-blue));
  background: var(--tone-bg, var(--c-soft));
  border-color: transparent;
}

.mf-logo--ini {
  font-size: 1rem;
}

.mf-plogo--ini {
  font-size: 2rem;
}

.is-tone-0 { --tone-bg: #e8f1ff; --tone-fg: #1677ff; }
.is-tone-1 { --tone-bg: #fff1e8; --tone-fg: #d9590f; }
.is-tone-2 { --tone-bg: #e7f7ee; --tone-fg: #138a42; }
.is-tone-3 { --tone-bg: #f1ecff; --tone-fg: #6941c6; }
.is-tone-4 { --tone-bg: #e6f6f8; --tone-fg: #0e7c8a; }
.is-tone-5 { --tone-bg: #edf1f7; --tone-fg: #0a2558; }

/* -------- Список -------- */
.mf-list {
  scroll-margin-top: 8rem;
}

.mf-list__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.mf-list__head b {
  color: var(--c-navy);
}

.mf-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15rem;
  gap: 0.75rem;
  margin-top: 1rem;
}

.mf-filters .bk-search {
  margin: 0;
}

.mf-select select {
  width: 100%;
  height: 100%;
  min-height: 2.875rem;
  padding: 0 2.25rem 0 0.875rem;
  font: inherit;
  font-size: 0.875rem;
  color: var(--c-text);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6b86' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6.5 9.5 5.5 5.5 5.5-5.5'/%3E%3C/svg%3E") no-repeat right 0.75rem center / 1rem;
  border: 0.0625rem solid var(--c-field-line);
  border-radius: var(--radius-lg);
  appearance: none;
  cursor: pointer;
}

.mf-select select:focus-visible {
  outline: 0.125rem solid var(--c-blue);
  outline-offset: 0.0625rem;
}

.mf .bk-chips {
  margin-top: 0.875rem;
}

.mf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.mf-grid--compact {
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  margin-bottom: 1rem;
}

.mf-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1rem;
  background: #fff;
  border: 0.0625rem solid var(--c-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.mf-card[hidden] {
  display: none;
}

.mf-card:hover {
  border-color: #b9cff5;
  box-shadow: 0 0.25rem 1.25rem rgba(22, 119, 255, .1);
  transform: translateY(-0.0625rem);
}

.mf-card__body {
  flex: 1;
  min-width: 0;
}

.mf-card__title {
  font-family: var(--font-head);
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.mf-card__title a:hover {
  color: var(--c-blue);
}

.mf-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.125rem 0.75rem;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--c-muted);
}


.mf-card__bin {
  margin-top: 0.125rem;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--c-muted);
}

.mf-card__tags {
  max-width: none;
  margin-top: 0.5rem;
}

.mf-card__arrow {
  flex: none;
  color: var(--c-blue);
  opacity: .5;
  transition: opacity .15s ease, transform .15s ease;
}

.mf-card__arrow .icon {
  width: 1.125rem;
  height: 1.125rem;
}

.mf-card:hover .mf-card__arrow {
  opacity: 1;
  transform: translateX(0.125rem);
}

.mf-more {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin: 1.25rem auto 0;
}

.mf-more[hidden] {
  display: none;
}

.mf-more .icon {
  width: 1rem;
  height: 1rem;
}

/* -------- ТОП-10 -------- */
.mf-top {
  margin-top: var(--section-gap);
  scroll-margin-top: 8rem;
}

.mf-top__rank {
  width: 2.5rem;
  font-family: var(--font-head);
  font-weight: 800;
  color: var(--c-blue);
}

.mf-top__table th[scope="row"] {
  white-space: normal;
  font-weight: 600;
}

.mf-top__table th[scope="row"] a {
  color: var(--c-navy);
  text-decoration: underline;
  text-decoration-color: var(--c-line);
  text-underline-offset: 0.2em;
}

.mf-top__table th[scope="row"] a:hover {
  color: var(--c-blue);
  text-decoration-color: currentColor;
}

.mf-top__model {
  min-width: 9rem;
  white-space: normal;
  font-size: 0.8125rem;
  color: var(--c-muted);
}

/* -------- Как проверить -------- */
.mf-check {
  margin-top: var(--section-gap);
  scroll-margin-top: 8rem;
}

.mf-steps {
  display: grid;
  gap: 0.625rem;
  margin-top: 0.875rem;
  counter-reset: step;
}

.mf-steps li {
  position: relative;
  min-height: 2rem;
  padding: 0.3125rem 0 0 2.75rem;
  font-size: 0.875rem;
  line-height: 1.55;
  counter-increment: step;
}

.mf-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  font-family: var(--font-head);
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--c-blue);
  background: var(--c-soft);
  border-radius: 50%;
}

.mf-check__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 1rem;
}

/* -------- Правая колонка -------- */
.mf-facts {
  display: grid;
  gap: 0.625rem;
  margin-block: 0.875rem 1rem;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.mf-facts b {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 800;
  color: var(--c-navy);
}

.mf-flags__list {
  display: grid;
  gap: 0.625rem;
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.mf-flags__list li {
  position: relative;
  padding-left: 1.5rem;
}

.mf-flags__list li::before {
  content: "!";
  position: absolute;
  left: 0;
  top: 0.0625rem;
  display: grid;
  place-items: center;
  width: 1rem;
  height: 1rem;
  font-size: 0.6875rem;
  font-weight: 800;
  color: #fff;
  background: var(--c-down);
  border-radius: 50%;
}

.mf-text {
  margin-top: 0.625rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--c-muted);
}

/* -------- Страница МФО -------- */
.mf-kicker {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--c-blue);
}

.mf-head .bk-hero__title.bkp-title {
  margin-top: 0.25rem;
  overflow-wrap: anywhere;
}

.mf-legal {
  font-size: 0.9375rem;
}

.mf-about p + p {
  margin-top: 0.75rem;
}

.mf-similar {
  margin-top: var(--section-gap);
  scroll-margin-top: 8rem;
}

.mf-info div {
  grid-template-columns: minmax(0, 1fr);
  gap: 0.125rem;
}

.mf-info dd {
  margin: 0;
}

#about,
#requisites,
#check,
#faq {
  scroll-margin-top: 8rem;
}

@media (max-width: 900px) {
  .mf-plogo--ini {
    font-size: 1.5rem;
  }
}

@media (max-width: 560px) {
  .mf .bkp-points {
    grid-template-columns: minmax(0, 1fr);
  }

  .mf-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .mf-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .mf-card {
    padding: 0.875rem;
  }

  .mf-logo {
    width: 2.75rem;
    height: 2.75rem;
  }

  .mf .bk-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    scrollbar-width: none;
  }

  .mf .bk-chip {
    flex: none;
  }
}
