/* ============================================================
   N1ceStudio — единый общий ФУТЕР (собрано из оригинального кода Тильды)
   Классы: .ns-footer, .ns-footer-*. Подключается на ВСЕ страницы.
   ============================================================ */

/* --- Сброс и базовые стили --- */
.ns-footer,
.ns-footer *,
.ns-footer a,
.ns-footer span,
.ns-footer div,
.ns-footer p {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  box-sizing: border-box;
}

/* --- Основной контейнер --- */
.ns-footer {
  position: relative !important;
  z-index: 1 !important;
  background: linear-gradient(180deg, rgba(8, 8, 14, 0.98) 0%, rgba(5, 5, 10, 1) 100%) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  width: 100%;
  color: rgba(255, 255, 255, 0.7);
}

.ns-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(59, 130, 246, 0.3) 20%, rgba(99, 102, 241, 0.5) 50%, rgba(59, 130, 246, 0.3) 80%, transparent 100%);
  background-size: 200% 100%;
  animation: nsGradientFlow 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes nsGradientFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.ns-footer-bg-pixels {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.15;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Crect width='8' height='8' fill='%23ffffff' fill-opacity='0.03'/%3E%3Crect x='8' y='8' width='8' height='8' fill='%23ffffff' fill-opacity='0.03'/%3E%3C/svg%3E");
  background-repeat: repeat; z-index: 1;
}

.ns-footer-bg-glow {
  position: absolute; bottom: -30%; left: 30%; right: 30%; height: 60%;
  background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
  pointer-events: none; z-index: 2;
}

/* --- Контейнер --- */
.ns-footer-container {
  position: relative; max-width: 1400px; margin: 0 auto; padding: 50px 40px 30px; z-index: 3;
}

/* --- Верх --- */
.ns-footer-top {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 60px;
  padding-bottom: 40px; border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ns-footer-brand { display: flex; flex-direction: column; gap: 20px; }

.ns-footer-logo-block {
  display: flex; align-items: center; gap: 16px; text-decoration: none !important;
  user-select: none; transition: transform 0.3s ease;
}
.ns-footer-logo-block:hover { transform: scale(1.02); }

.ns-footer-logo-img {
  width: 52px; height: 52px; object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.3)); transition: filter 0.3s ease;
}
.ns-footer-logo-block:hover .ns-footer-logo-img { filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.5)); }

.ns-footer-logo-text { display: flex; flex-direction: column; }
.ns-footer-logo-title {
  font-size: 24px; font-weight: 900; color: #ffffff; letter-spacing: 0.04em;
  text-transform: uppercase; line-height: 1.1;
}
.ns-footer-blue-text { color: #3b82f6; text-shadow: 0 0 20px rgba(59, 130, 246, 0.5); }
.ns-footer-logo-subtitle {
  font-size: 9px; font-weight: 500; color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.25em; text-transform: uppercase; margin-top: 2px;
}

.ns-footer-description {
  font-size: 14px; color: rgba(255, 255, 255, 0.5); line-height: 1.7; max-width: 340px;
}

.ns-footer-socials { display: flex; gap: 16px; margin-top: 8px; }

.ns-social-link {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none !important; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative; overflow: hidden;
}
.ns-social-link::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(99, 102, 241, 0.15));
  opacity: 0; transition: opacity 0.3s ease;
}
.ns-social-link:hover::before { opacity: 1; }
.ns-social-link:hover {
  border-color: rgba(59, 130, 246, 0.4); transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.2);
}
.ns-social-link img {
  width: 20px; height: 20px; object-fit: contain; position: relative; z-index: 1;
  filter: brightness(0.9); transition: filter 0.3s ease;
}
.ns-social-link:hover img { filter: brightness(1.2); }
.ns-social-link span {
  font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.7);
  position: relative; z-index: 1; transition: color 0.3s ease;
}
.ns-social-link:hover span { color: #ffffff; }

/* --- Колонки --- */
.ns-footer-col { display: flex; flex-direction: column; gap: 16px; }
.ns-footer-col-title {
  font-size: 13px; font-weight: 700; color: #ffffff; text-transform: uppercase;
  letter-spacing: 0.1em; margin-bottom: 4px;
}
.ns-footer-col-link {
  font-size: 14px; color: rgba(255, 255, 255, 0.5); text-decoration: none !important;
  transition: all 0.3s ease; display: inline-block; position: relative; padding-left: 0;
}
.ns-footer-col-link::before {
  content: ''; position: absolute; left: 0; top: 50%; width: 0; height: 1px;
  background: #3b82f6; transition: width 0.3s ease;
}
.ns-footer-col-link:hover { color: #ffffff; padding-left: 16px; }
.ns-footer-col-link:hover::before { width: 10px; }

/* --- Нижняя часть --- */
.ns-footer-bottom { padding-top: 24px; }
.ns-footer-legal-block { margin-bottom: 16px; }
.ns-footer-legal-title { font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, 0.5); margin-bottom: 8px; }
.ns-footer-legal-text { font-size: 11px; color: rgba(255, 255, 255, 0.35); line-height: 1.6; margin-bottom: 4px; }
.ns-footer-legal-links { display: flex; gap: 20px; margin-top: 12px; flex-wrap: wrap; }
.ns-footer-legal-link {
  font-size: 11px; color: rgba(255, 255, 255, 0.4); text-decoration: none !important;
  transition: color 0.3s ease;
}
.ns-footer-legal-link:hover { color: #3b82f6; }

.ns-footer-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  flex-wrap: wrap;
}

.ns-footer-copyright {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  line-height: 1.6;
  margin: 0;
  max-width: 70%;
}
.ns-footer-copyright span { color: #3b82f6; font-weight: 600; }

/* --- PICFLOW badge --- */
.ns-footer-pf-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 8px 16px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 9999px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  text-decoration: none !important;
  flex-shrink: 0;
}
.ns-footer-pf-badge:hover {
  border-color: rgba(163, 230, 53, 0.4) !important;
  background: rgba(163, 230, 53, 0.06) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(163, 230, 53, 0.15) !important;
}
.ns-footer-pf-icon {
  width: 28px !important;
  height: 28px !important;
  border-radius: 7px !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  background: #a3e635 !important;
}
.ns-footer-pf-icon img { width: 100% !important; height: 100% !important; object-fit: cover !important; display: block !important; }
.ns-footer-pf-text { color: rgba(255, 255, 255, 0.5) !important; font-size: 12px !important; font-weight: 400 !important; white-space: nowrap; }
.ns-footer-pf-name {
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  font-family: 'Space Grotesk', 'Inter', sans-serif !important;
  letter-spacing: -0.02em !important;
  white-space: nowrap !important;
}
.ns-footer-pf-arrow { width: 16px !important; height: 16px !important; flex-shrink: 0 !important; display: block !important; transition: transform 0.3s ease !important; }
.ns-footer-pf-arrow path {
  stroke: rgba(255, 255, 255, 0.4) !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  fill: none !important;
  transition: stroke 0.3s ease !important;
}
.ns-footer-pf-badge:hover .ns-footer-pf-arrow { transform: translateX(3px) !important; }
.ns-footer-pf-badge:hover .ns-footer-pf-arrow path,
.ns-footer-pf-badge:hover .ns-footer-pf-name { stroke: #a3e635 !important; color: #a3e635 !important; }

/* --- Адаптив --- */
@media (max-width: 1199px) {
  .ns-footer-container { padding: 40px 32px 24px; }
  .ns-footer-top { gap: 40px; }
}
@media (max-width: 991px) {
  .ns-footer-container { padding: 35px 24px 20px; }
  .ns-footer-top { grid-template-columns: 1fr 1fr; gap: 40px 30px; }
  .ns-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  .ns-footer-container { padding: 30px 20px 16px; }
  .ns-footer-top { grid-template-columns: 1fr; gap: 32px; }
  .ns-footer-brand { grid-column: auto; }
  .ns-footer-bottom-row { flex-direction: column; align-items: center; text-align: center; gap: 16px; }
  .ns-footer-copyright { max-width: 100%; }
}
@media (max-width: 480px) {
  .ns-footer-container { padding: 24px 16px 14px; }
  .ns-footer-logo-title { font-size: 20px; }
  .ns-footer-logo-img { width: 44px; height: 44px; }
  .ns-footer-socials { flex-direction: column; }
  .ns-footer-legal-links { flex-direction: column; gap: 8px; }
  .ns-footer-pf-badge { padding: 6px 12px !important; gap: 10px !important; }
  .ns-footer-pf-icon { width: 24px !important; height: 24px !important; }
  .ns-footer-pf-name { font-size: 13px !important; }
  .ns-footer-pf-text { font-size: 11px !important; }
}