.footer {
  background: var(--neutral-dark);
  color: var(--neutral-light);
  padding: clamp(3rem, 8vw, 6rem) clamp(1rem, 4vw, 3rem) clamp(1.5rem, 4vw, 2.5rem);
  margin-top: clamp(3rem, 6vw, 5rem);
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0.25rem;
  background: var(--accent-gradient);
  box-shadow: 0 0 2rem rgba(58, 1, 92, 0.8);
}

.footer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(58, 1, 92, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.footer-container {
  max-width: 75rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(2rem, 5vw, 3rem);
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.footer-column {
  flex: 1;
  min-width: clamp(12rem, 25vw, 15.625rem);
}

.footer-column h3 {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: var(--fw-semibold);
  color: var(--neutral-light);
  margin-bottom: clamp(1rem, 3vw, 1.5rem);
  line-height: 1.3;
  letter-spacing: 0.05em;
  position: relative;
  text-transform: uppercase;
}

.footer-column h3::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: clamp(2rem, 5vw, 3rem);
  height: 0.125rem;
  background: var(--accent-gradient);
  border-radius: 0.0625rem;
  box-shadow: 0 0 0.5rem rgba(58, 1, 92, 0.6);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links .nav-link {
  margin-bottom: clamp(0.5rem, 1.5vw, 0.75rem);
}

.footer-links .nav-link a {
  font-family: var(--font-body);
  font-size: clamp(0.875rem, 2vw, 1rem);
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  position: relative;
  padding: 0.25rem 0;
}

.footer-links .nav-link a:hover {
  color: var(--primary);
  transform: translateX(0.25rem);
}

.footer-links .nav-link a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 0.0625rem;
  background: var(--primary);
  transition: width 0.3s ease;
}

.footer-links .nav-link a:hover::before {
  width: 100%;
}

.footer-column div {
  margin-bottom: clamp(0.75rem, 2vw, 1rem);
}

.footer-column strong {
  font-family: var(--font-heading);
  font-weight: var(--fw-medium);
  color: var(--primary);
  display: block;
  margin-bottom: clamp(0.25rem, 1vw, 0.375rem);
  font-size: clamp(0.875rem, 1.8vw, 0.95rem);
}

.footer-column p {
  font-family: var(--font-body);
  font-size: clamp(0.875rem, 2vw, 1rem);
  margin: 0;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}

.footer-bottom {
  border-top: 0.0625rem solid rgba(139, 92, 246, 0.2);
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: clamp(1.5rem, 4vw, 2rem);
  text-align: center;
  position: relative;
}

.footer-bottom p {
  font-family: var(--font-body);
  margin: clamp(0.25rem, 1vw, 0.375rem) 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: clamp(0.8rem, 1.8vw, 0.9rem);
  line-height: 1.5;
  font-weight: var(--fw-medium);
}

.extra-links {
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 4vw, 2rem);
  margin-top: clamp(1rem, 3vw, 1.5rem);
  flex-wrap: wrap;
}

.extra-links a {
  font-family: var(--font-body);
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: clamp(0.8rem, 1.8vw, 0.9rem);
  font-weight: var(--fw-regular);
  transition: all 0.3s ease;
  position: relative;
  padding: 0.25rem 0;
}

.extra-links a:hover {
  color: var(--primary);
  transform: translateY(-0.125rem);
}

.extra-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 0.0625rem;
  background: var(--primary);
  transition: width 0.3s ease;
}

.extra-links a:hover::after {
  width: 100%;
}

.popup-modal {
  display: none; /* hidden initially */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

.popup-content {
  background: #fff;
  margin: 5% auto;
  padding: 2rem;
  border-radius: 10px;
  max-width: 500px;
  text-align: center;
  position: relative;
  max-height: 80vh;
  overflow: hidden;
  position: relative;
}

.close-popup {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
}

.popup-scrollable {
  max-height: 50vh;
  overflow-y: auto;
  padding-right: 1rem;
}

@media (max-width: 1024px) {
  .footer-container {
    gap: clamp(1.5rem, 4vw, 2.5rem);
  }

  .footer-column {
    min-width: clamp(10rem, 22vw, 13.75rem);
  }

  .footer {
    padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 3vw, 1.5rem) clamp(1rem, 3vw, 1.5rem);
  }
}

@media (max-width: 820px) {
  .footer-container {
    flex-direction: column;
    gap: clamp(2rem, 5vw, 2.5rem);
  }

  .footer-column {
    min-width: auto;
    text-align: center;
  }

  .footer {
    padding: clamp(2rem, 5vw, 2.5rem) clamp(1rem, 3vw, 1rem) clamp(1rem, 3vw, 1rem);
    margin-top: clamp(2rem, 5vw, 3rem);
  }

  .footer-column h3::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .extra-links {
    flex-direction: column;
    gap: clamp(0.5rem, 2vw, 0.75rem);
    align-items: center;
  }
}

@media (max-width: 600px) {
  .footer {
    padding: clamp(1.5rem, 4vw, 2rem) clamp(0.75rem, 2vw, 0.75rem) clamp(0.75rem, 2vw, 0.75rem);
    margin-top: clamp(1.5rem, 4vw, 2rem);
  }

  .footer-container {
    gap: clamp(1.5rem, 4vw, 2rem);
  }

  .footer-column h3 {
    font-size: clamp(0.9rem, 2.2vw, 1.125rem);
  }

  .footer-column p,
  .footer-links .nav-link a {
    font-size: clamp(0.8rem, 1.8vw, 0.95rem);
  }

  .footer-bottom p,
  .extra-links a {
    font-size: clamp(0.75rem, 1.6vw, 0.85rem);
  }

  .extra-links {
    gap: clamp(0.375rem, 1.5vw, 0.5rem);
  }
}
