/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */
/* Единственный источник отступа до футера.
   Последний контентный блок каждой страницы НЕ должен иметь padding-bottom / margin-bottom.
   Desktop: 40px | Mobile (≤860px): 28px */
.site-footer {
  margin-top: 40px;
  transition: border-color 0.3s;
}

.footer-inner {
  padding: 56px 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
  flex-wrap: wrap;
}

/* Logo column */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex-shrink: 0;
  max-width: 280px;
}

.footer-logo img { display: block; height: 60px; width: auto; }

.footer-desc {
  font-size: 14px;
  font-weight: 400;
  color: var(--white-70);
  line-height: 1.6;
  transition: color 0.3s;
}

/* Links grid (two columns) */
.footer-links-grid {
  display: grid;
  grid-template-columns: auto auto;
  gap: 10px 80px;
  align-items: start;
  justify-content: end;
  flex-shrink: 0;
}

.footer-col-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Socials */
.footer-socials {
  display: flex;
  gap: 3px;
  align-items: center;
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-light);
  border: 1px solid var(--white-14);
  color: var(--white-70);
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform 0.1s;
}

.footer-social-link:hover {
  background: #0077FF;
  border-color: #0077FF;
  color: #fff;
  transform: scale(1.08);
}

.footer-social-link:active { transform: scale(0.95); }

[data-theme="light"] .footer-social-link { color: #1a1a2e; border-color: rgba(0,0,0,0.15); }
[data-theme="light"] .footer-social-link img { filter: invert(1); }
[data-theme="light"] .footer-social-link:hover img { filter: none; }

/* TikTok PNG — тёмный, инвертируем в белый в тёмной теме */
.footer-social-link[aria-label="TikTok"] img { filter: invert(1); }
/* В светлой теме PNG уже тёмный — убираем двойную инверсию */
[data-theme="light"] .footer-social-link[aria-label="TikTok"] img { filter: none; }
/* На hover (синий фон) в светлой теме — делаем белым */
[data-theme="light"] .footer-social-link[aria-label="TikTok"]:hover img { filter: invert(1); }

.footer-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--white-70);
  text-decoration: none;
  transition: color var(--transition);
  line-height: 1.3;
  white-space: nowrap;
}

.footer-link:hover  { color: var(--purple); }
.footer-link:active { color: var(--purple-dark); }

/* Bottom bar */
.footer-bottom {
  border-top: 1px solid var(--white-14);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: border-color 0.3s;
}

.footer-copy {
  font-size: 13px;
  color: var(--white-40);
  transition: color 0.3s;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .footer-inner {
    gap: 32px;
    padding: 48px 0 28px;
  }
}

@media (max-width: 700px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-links-grid { width: 100%; }
}

/* ── 510–700px: колонка, выключка по левому краю ── */
@media (min-width: 510px) and (max-width: 700px) {
  .footer-inner {
    align-items: flex-start;
  }
  .footer-brand {
    align-items: flex-start;
    text-align: left;
  }
  .footer-desc { text-align: left; }
  .footer-links-grid {
    grid-template-columns: auto auto;
    justify-content: start;
  }
  .footer-col-links {
    align-items: flex-start;
  }
  .footer-bottom { justify-content: flex-start; }
  .footer-copy { text-align: left; }
}


/* ── MOBILE FOOTER ── */
@media (max-width: 510px) {
  .site-footer { margin-top: 28px; }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 36px 0 24px;
  }

  .footer-brand {
    align-items: center;
    text-align: center;
    max-width: none;
  }
  .footer-desc { text-align: center; }
  .footer-logo img { height: 52px; }

  .footer-links-grid {
    width: 100%;
    grid-template-columns: 1fr;
    justify-content: center;
    justify-items: center;
    gap: 24px 0;
  }
  .footer-col-links {
    align-items: center;
    gap: 14px;
  }
  .footer-links-grid .footer-col-links:first-child .footer-link {
    color: var(--white);
  }

  .footer-bottom { justify-content: center; padding: 16px 0; text-align: center; }
  .footer-copy { text-align: center; width: 100%; }
}
