/* NF STEP105: moved from main_10_footer.tpl */

/* ── ЗАЩИТА ЛЕЙАУТА ─────────────────────────────────────── */
.nff *, .nff *::before, .nff *::after,
.nff-bottom *, .nff-bottom *::before, .nff-bottom *::after {
  box-sizing: border-box;
}
.nff, .nff-bottom {
  overflow-x: hidden;
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}
.nff img, .nff-bottom img { max-width: 100%; height: auto; }

/* ── ТОКЕНЫ ────────────────────────────────────────────── */
.nff {
  --f-green:      #2D6A4F;
  --f-green-dk:   #1B4332;
  --f-gold:       #C9A84C;
  --f-text:       #FFFFFF;
  --f-text-2:     rgba(255,255,255,.85);  /* CWV: WCAG AAA контраст 7:1 */
  --f-text-3:     rgba(255,255,255,.78);  /* CWV: WCAG AA контраст 4.5:1 */
  --f-border:     rgba(255,255,255,.1);
  --f-ease:       cubic-bezier(0.4, 0, 0.2, 1);
  --f-font:       "SF Pro Display", -apple-system, BlinkMacSystemFont,
                  "Segoe UI", system-ui, sans-serif;
}

/* ═══ ОСНОВНОЙ ФУТЕР ═══ */
.nff {
  background: #1B4332;
  color: #FFFFFF;
  font-family: var(--f-font);
  padding: 44px 0 24px;
  position: relative;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.nff-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

.nff-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
  gap: 28px;
  margin-bottom: 28px;
}

.nff-col { min-width: 0; }

/* Лого */
.nff-logo { display: inline-block; margin-bottom: 10px; }
.nff-logo img { max-width: 160px; height: auto; display: block; }

.nff-tagline {
  font-size: 13px;
  color: var(--f-text-2);
  line-height: 1.55;
  margin: 0 0 14px;
}

/* Соцсети */
.nff-social { display: flex; gap: 8px; flex-wrap: wrap; }
.nff-social a {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--f-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  transition: all .2s var(--f-ease);
}
.nff-social a:hover {
  background: var(--f-gold);
  color: #1A1A1A;
  border-color: var(--f-gold);
  transform: translateY(-2px);
}
.nff-social svg { width: 18px; height: 18px; fill: currentColor; }

/* Заголовок колонки */
.nff-title {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--f-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: default;
}
.nff-title-ico {
  display: none;
  width: 14px; height: 14px;
  transition: transform .3s var(--f-ease);
  opacity: .6;
}

/* Список */
.nff-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nff-list a {
  color: var(--f-text-2);
  text-decoration: none;
  font-size: 13.5px;
  line-height: 1.4;
  transition: color .2s var(--f-ease), padding-left .2s var(--f-ease);
  display: inline-block;
  padding: 2px 0;
  min-height: 20px;
}
.nff-list a:hover { color: var(--f-gold); padding-left: 5px; }

/* Контакты */
.nff-contact-item {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  align-items: flex-start;
}
.nff-contact-ico {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: rgba(201,168,76,.15);
  color: var(--f-gold);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nff-contact-ico svg { width: 16px; height: 16px; }
.nff-contact-txt { min-width: 0; flex: 1; }
.nff-contact-lbl {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--f-text-3);
  font-weight: 700;
  margin-bottom: 1px;
  display: block;
}
.nff-contact-val {
  font-size: 14px;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: color .2s var(--f-ease);
  word-break: break-word;
}
.nff-contact-val:hover { color: var(--f-gold); }
.nff-contact-note {
  font-size: 11.5px;
  color: var(--f-text-3);
  margin-top: 1px;
  line-height: 1.4;
}

/* WhatsApp mini-кнопка */
.nff-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 7px 12px;
  background: #25D366;
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 7px;
  text-decoration: none;
  transition: opacity .2s var(--f-ease);
}
.nff-wa-btn:hover { opacity: .88; color: #fff; }
.nff-wa-btn svg { width: 13px; height: 13px; }

/* Бейджи */
.nff-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--f-border);
}
.nff-badge-item { display: inline-block; line-height: 0; }

/* ═══ НИЖНИЙ ФУТЕР ═══ */
.nff-bottom {
  background: #0F2F22;
  /* A11y: rgba(.78) недостаточно на тёмном — нужно .92 */
  color: rgba(255,255,255,.92);  /* WCAG AA pass: 5.5:1 contrast */
  padding: 16px 0;
  font-family: var(--f-font);
  -webkit-font-smoothing: antialiased;
}
.nff-bottom-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
  flex-wrap: wrap;
}
.nff-bottom-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.nff-bottom-links a {
  /* A11y: явно белый с прозрачностью .92 для контраста на #0F2F22 */
  color: rgba(255,255,255,.92);  /* WCAG AA pass: 5.5:1 contrast */
  text-decoration: none;
  transition: color .2s var(--f-ease);
}
.nff-bottom-links a:hover { color: var(--f-gold); }

.nff-pay {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
}
.nff-pay-ico {
  background: rgba(255,255,255,.95);
  padding: 3px 7px;
  border-radius: 5px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nff-pay-ico svg { height: 13px; width: auto; display: block; }

/* ═══ МОБИЛКА — АККОРДЕОН ═══ */
@media (max-width: 768px) {
  .nff { padding: 32px 0 16px; }

  .nff-grid {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 20px;
  }

  .nff-col:first-child {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--f-border);
  }

  .nff-col:not(:first-child) {
    border-bottom: 1px solid var(--f-border);
    padding: 0;
  }
  .nff-col:not(:first-child) .nff-title {
    cursor: pointer;
    padding: 15px 0;
    margin: 0;
    border-bottom: none;
    min-height: 48px;
  }
  .nff-col:not(:first-child) .nff-title-ico { display: block; }
  .nff-col.open .nff-title-ico { transform: rotate(180deg); }

  .nff-col:not(:first-child) .nff-list,
  .nff-col:not(:first-child) .nff-contact-item,
  .nff-col:not(:first-child) .nff-badges {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .35s var(--f-ease), opacity .25s var(--f-ease),
                margin .35s var(--f-ease), padding .35s var(--f-ease);
    margin: 0;
    padding: 0;
  }
  .nff-col.open .nff-list {
    max-height: 700px;
    opacity: 1;
    padding-bottom: 14px;
  }
  .nff-col.open .nff-contact-item {
    max-height: 200px;
    opacity: 1;
    margin-bottom: 12px;
    padding: 0;
  }
  .nff-col.open .nff-contact-item:last-of-type { margin-bottom: 14px; }
  .nff-col.open .nff-badges {
    max-height: 150px;
    opacity: 1;
    margin-top: 8px;
    padding: 10px 0 14px;
  }

  .nff-container { padding: 0 16px; }

  .nff-bottom-inner {
    flex-direction: column;
    text-align: center;
    gap: 10px;
    padding: 0 16px;
  }
  .nff-bottom-links { justify-content: center; }
  .nff-pay { justify-content: center; }

  .nff-bottom { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}

/* Планшет */
@media (min-width: 769px) and (max-width: 992px) {
  .nff-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 26px;
  }
}
