/* =============================================================================
 * Footer redesign 2026 — единый editorial-подвал.
 * Подключается ПОСЛЕ style.css / arqelya-editorial-global.css, чтобы перебить
 * legacy-правила. Тёмная тема — через html[data-theme="dark"] селекторы.
 * ============================================================================= */

.arq-foot,
.site-footer.arq-foot,
.page-editorial .site-footer.arq-foot,
/* Высокоспецифичные дубли — чтобы перебить per-page правила вроде
   `body.page-body.page-editorial.page-services-editorial .site-footer { background: ... }`
   из arqelya-theme.css (специфичность 0,5,1). */
body.page-body.page-editorial.page-services-editorial .site-footer.arq-foot,
body.page-body.page-editorial.page-practices-editorial .site-footer.arq-foot,
body.page-body.page-editorial.page-cabinet .site-footer.arq-foot,
body.page-body.page-editorial.page-community .site-footer.arq-foot,
body.page-body.page-editorial.page-bundles-editorial .site-footer.arq-foot,
body.page-body.page-editorial.page-journal .site-footer.arq-foot,
body.page-body.page-editorial.page-qa .site-footer.arq-foot {
  --foot-paper: #f4efe6;
  --foot-paper-2: #ede6da;
  --foot-ink: #2a2520;
  --foot-ink-soft: rgba(42, 37, 32, 0.72);
  --foot-ink-mute: rgba(42, 37, 32, 0.5);
  --foot-line: rgba(42, 37, 32, 0.14);
  --foot-line-soft: rgba(42, 37, 32, 0.08);
  --foot-accent: #c0653b;
  --foot-accent-hover: #a85428;

  position: relative;
  margin-top: clamp(48px, 8vw, 96px);
  background:
    linear-gradient(180deg, var(--foot-paper) 0%, var(--foot-paper-2) 100%) !important;
  color: var(--foot-ink-soft);
  font-family: Jost, system-ui, sans-serif;
  border-top: 0 !important;
  isolation: isolate;
  backdrop-filter: none;
}

.arq-foot::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--foot-line) 18%,
    var(--foot-line) 82%,
    transparent 100%
  );
}

.arq-foot::after {
  content: "";
  position: absolute;
  pointer-events: none;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 1px;
  background: var(--foot-accent);
  opacity: 0.55;
}

.arq-foot__shell {
  width: min(100% - 48px, 1280px);
  margin: 0 auto;
}

/* ---- Верхняя часть: 4-колоночная сетка ---- */
.arq-foot__top {
  padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 48px);
}

.arq-foot__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

@media (max-width: 991.98px) {
  .arq-foot__grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px 28px;
  }
  .arq-foot__brand-col {
    grid-column: 1 / -1;
  }
}

@media (max-width: 575.98px) {
  .arq-foot__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .arq-foot__shell {
    width: min(100% - 32px, 1280px);
  }
}

/* ---- Бренд-колонка ---- */
.arq-foot__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  margin-bottom: 14px;
}

.arq-foot__logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}

.arq-foot__brand-name,
.arq-foot .arq-foot__brand-name {
  font-family: "Cormorant Garamond", Georgia, serif !important;
  font-size: clamp(24px, 2.4vw, 30px) !important;
  font-style: italic !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em !important;
  color: var(--foot-ink) !important;
  line-height: 1.1;
}

.arq-foot__lead {
  margin: 0 0 14px;
  max-width: 32ch;
  font-family: "Lora", "Cormorant Garamond", Georgia, serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--foot-ink-soft);
}

.arq-foot__safety {
  margin: 0 0 18px;
  max-width: 34ch;
  font-size: 12px;
  line-height: 1.5;
  color: var(--foot-ink-mute);
  letter-spacing: 0.01em;
}

.arq-foot__crisis,
.arq-foot a.arq-foot__crisis {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 12px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none !important;
  color: var(--foot-accent) !important;
  background: rgba(192, 101, 59, 0.08);
  border: 1px solid rgba(192, 101, 59, 0.22);
  border-radius: 999px;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}

.arq-foot__crisis:hover,
.arq-foot__crisis:focus-visible,
.arq-foot a.arq-foot__crisis:hover,
.arq-foot a.arq-foot__crisis:focus-visible {
  background: var(--foot-accent);
  color: #fffaf3 !important;
  border-color: var(--foot-accent);
  transform: translateY(-1px);
}

.arq-foot__crisis-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(192, 101, 59, 0.18);
  flex-shrink: 0;
}

/* ---- Колонки навигации ---- */
.arq-foot__col-eyebrow {
  margin: 0 0 16px;
  font-family: Jost, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--foot-ink-mute);
}

.arq-foot__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.arq-foot__link,
.arq-foot a.arq-foot__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: Jost, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--foot-ink) !important;
  text-decoration: none !important;
  transition: color 0.2s ease, transform 0.2s ease;
  position: relative;
}

.arq-foot__link::before {
  content: "";
  width: 0;
  height: 1px;
  background: var(--foot-accent);
  opacity: 0.6;
  transition: width 0.25s ease;
}

.arq-foot__link:hover,
.arq-foot__link:focus-visible,
.arq-foot a.arq-foot__link:hover,
.arq-foot a.arq-foot__link:focus-visible {
  color: var(--foot-accent) !important;
}

.arq-foot__link:hover::before,
.arq-foot__link:focus-visible::before {
  width: 14px;
}

.arq-foot__link--external::after {
  content: "↗";
  font-size: 11px;
  opacity: 0.55;
  margin-left: 2px;
}

/* ---- Колонка «Связь» с разделом документов ---- */
.arq-foot__col--contact .arq-foot__list {
  margin-bottom: 22px;
}

.arq-foot__contact-line {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.arq-foot__contact-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--foot-ink-mute);
}

.arq-foot__contact-value,
.arq-foot a.arq-foot__contact-value {
  font-family: Jost, system-ui, sans-serif;
  font-size: 14px;
  color: var(--foot-ink) !important;
  text-decoration: none !important;
  transition: color 0.2s ease;
  word-break: break-word;
}

.arq-foot__contact-value:hover,
.arq-foot a.arq-foot__contact-value:hover {
  color: var(--foot-accent) !important;
}

.arq-foot__legal-eyebrow {
  margin: 4px 0 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--foot-ink-mute);
}

.arq-foot__legal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.arq-foot__legal-list a,
.arq-foot .arq-foot__legal-list a {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--foot-ink-soft) !important;
  text-decoration: none !important;
  border-bottom: 1px dotted transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.arq-foot__legal-list a:hover,
.arq-foot .arq-foot__legal-list a:hover {
  color: var(--foot-ink) !important;
  border-bottom-color: var(--foot-line);
}

/* ---- Нижняя полоса: copyright + tagline ---- */
.arq-foot__bottom {
  padding: 18px 0 22px;
  border-top: 1px solid var(--foot-line-soft);
}

.arq-foot__bottom-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
}

.arq-foot__copy {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--foot-ink-mute);
}

.arq-foot__copy strong {
  font-weight: 500;
  color: var(--foot-ink-soft);
}

.arq-foot__quiet {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 14px;
  font-style: italic;
  color: var(--foot-ink-mute);
  letter-spacing: 0.01em;
}

@media (max-width: 575.98px) {
  .arq-foot__bottom-row {
    justify-content: flex-start;
  }
}

/* =============================================================================
 * Тёмная тема
 * ============================================================================= */
html[data-theme="dark"] .arq-foot,
html[data-theme="dark"] .site-footer.arq-foot,
html[data-theme="dark"] .page-editorial .site-footer.arq-foot,
/* Высокоспецифичные дубли для per-page правил из arqelya-theme.css */
html[data-theme="dark"] body.page-body.page-editorial.page-services-editorial .site-footer.arq-foot,
html[data-theme="dark"] body.page-body.page-editorial.page-practices-editorial .site-footer.arq-foot,
html[data-theme="dark"] body.page-body.page-editorial.page-cabinet .site-footer.arq-foot,
html[data-theme="dark"] body.page-body.page-editorial.page-community .site-footer.arq-foot,
html[data-theme="dark"] body.page-body.page-editorial.page-bundles-editorial .site-footer.arq-foot,
html[data-theme="dark"] body.page-body.page-editorial.page-journal .site-footer.arq-foot,
html[data-theme="dark"] body.page-body.page-editorial.page-qa .site-footer.arq-foot {
  --foot-paper: #1a1714;
  --foot-paper-2: #161311;
  --foot-ink: #f0e6d6;
  --foot-ink-soft: rgba(240, 230, 214, 0.78);
  --foot-ink-mute: rgba(240, 230, 214, 0.5);
  --foot-line: rgba(229, 219, 200, 0.14);
  --foot-line-soft: rgba(229, 219, 200, 0.08);
  --foot-accent: #e07a4f;
  --foot-accent-hover: #ec8a5e;
  background:
    linear-gradient(180deg, var(--foot-paper) 0%, var(--foot-paper-2) 100%) !important;
}

html[data-theme="dark"] .arq-foot__crisis {
  background: rgba(224, 122, 79, 0.1);
  border-color: rgba(224, 122, 79, 0.28);
}

html[data-theme="dark"] .arq-foot__crisis:hover,
html[data-theme="dark"] .arq-foot__crisis:focus-visible {
  background: var(--foot-accent);
  color: #16110d;
  border-color: var(--foot-accent);
}

/* =============================================================================
 * Минимальный футер (главная) — лёгкая полировка
 * ============================================================================= */
.arq-footer-minimal {
  border-top: 1px solid var(--arq-line, rgba(42, 37, 32, 0.1));
  background: transparent;
  margin-top: clamp(40px, 6vw, 72px);
}

.arq-footer-minimal__inner {
  width: min(100% - 48px, 1280px);
  margin: 0 auto;
  padding: 22px 0 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.arq-footer-minimal__copy {
  margin: 0;
  font-family: Jost, system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--arq-ink-mute, #9a9085);
}

.arq-footer-minimal__disclaimer {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 14px;
  font-style: italic;
  color: var(--arq-ink-mute, #9a9085);
  letter-spacing: 0.01em;
}

.arq-footer-minimal__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  width: 100%;
  margin-top: 4px;
}

.arq-footer-minimal__nav--below {
  border-top: 1px solid var(--arq-line-soft, rgba(42, 37, 32, 0.06));
  padding-top: 14px;
  margin-top: 10px;
}

.arq-footer-minimal__link {
  font-family: Jost, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--arq-ink-soft, #7a6f63);
  text-decoration: none;
  transition: color 0.2s ease;
}

.arq-footer-minimal__link:hover {
  color: var(--arq-accent, #c0653b);
}

.arq-footer-minimal__sep {
  color: var(--arq-line, #c9c2b5);
  font-size: 10px;
}

html[data-theme="dark"] .arq-footer-minimal {
  border-top-color: var(--arq-line, rgba(229, 219, 200, 0.14));
}

html[data-theme="dark"] .arq-footer-minimal__link:hover {
  color: var(--arq-accent-hover, #ec8a5e);
}

/* =============================================================================
 * Печать
 * ============================================================================= */
@media print {
  .arq-foot,
  .arq-footer-minimal {
    display: none !important;
  }
}
