
#footer {
  background: var(--clr-primary-dark);
  color: var(--clr-white);
  position: relative;
  overflow: hidden;
}

.footer-bg {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.footer-divider {
  height: 3px;
  background: var(--grad-brand);
}

.footer-main {
  position: relative;
  z-index: 1;
  padding-block: var(--sp-16);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--sp-10);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.footer-logo-wrap {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.footer-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.footer-brand-name {
  font-size: var(--fs-base);
  font-weight: 800;
  color: var(--clr-white);
  line-height: 1.2;
  text-transform: uppercase;
}

.footer-brand-tagline {
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.05em;
}

.footer-brand-desc {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.8;
}

.footer-socials {
  display: flex;
  gap: var(--sp-3);
}

.footer-social {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all var(--tr-spring);
}

.footer-social:hover {
  background: var(--grad-brand);
  border-color: transparent;
  color: var(--clr-white);
  transform: translateY(-3px);
}

.footer-col-title {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--clr-white);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--sp-5);
  position: relative;
  padding-bottom: var(--sp-3);
}

.footer-col-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--grad-brand);
  border-radius: var(--radius-full);
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.footer-nav-link {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color var(--tr-fast), transform var(--tr-fast);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}

.footer-nav-link::before {
  content: '→';
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity var(--tr-fast), transform var(--tr-fast);
  font-size: var(--fs-xs);
}

.footer-nav-link:hover {
  color: var(--clr-white);
  transform: translateX(4px);
}

.footer-nav-link:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.footer-newsletter {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.footer-newsletter p {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
}

.newsletter-form {
  display: flex;
  gap: var(--sp-2);
}

.newsletter-input {
  flex: 1;
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  color: var(--clr-white);
  outline: none;
  transition: border-color var(--tr-fast), background var(--tr-fast);
}

.newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.newsletter-input:focus {
  border-color: rgba(75, 191, 107, 0.5);
  background: rgba(255, 255, 255, 0.12);
}

.newsletter-btn {
  padding: var(--sp-3) var(--sp-4);
  background: var(--grad-brand);
  color: var(--clr-white);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 1rem;
  transition: transform var(--tr-spring), box-shadow var(--tr-normal);
  flex-shrink: 0;
}

.newsletter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(26, 86, 184, 0.4);
}

.footer-bottom {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-block: var(--sp-6);
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.footer-copyright {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.5);
}

.footer-copyright span {
  color: rgba(75, 191, 107, 0.9);
  font-weight: 600;
}

.footer-bottom-links {
  display: flex;
  gap: var(--sp-6);
}

.footer-bottom-link {
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: color var(--tr-fast);
}

.footer-bottom-link:hover {
  color: rgba(255, 255, 255, 0.9);
}

#back-to-top {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--grad-brand);
  color: var(--clr-white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 20px rgba(26, 86, 184, 0.4);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--tr-normal), transform var(--tr-spring);
  z-index: 998;
}

#back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
}

#back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(26, 86, 184, 0.5);
}

@media (max-width: 1100px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-8);
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }

  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-bottom-links {
    gap: var(--sp-4);
  }

  #back-to-top {
    bottom: var(--sp-4);
    right: var(--sp-4);
    width: 42px;
    height: 42px;
  }
}
