.footer {
  --footer-content: rgba(255, 255, 255, 0.62);
  --footer-content-hover: rgba(255, 255, 255, 0.82);
  background-color: #0a0e18;
  color: var(--footer-content);
  border-top: 1px solid rgba(59, 130, 246, 0.1);
  padding: 0;
  margin-top: auto;
  position: relative;
  z-index: 51;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.footer-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 70%, transparent 100%);
}

.footer-inner {
  position: relative;
  z-index: 2;
  padding: 5rem 6rem 2.5rem;
  color: var(--footer-content);
  -webkit-font-smoothing: auto;
}

/* Muted body copy; section headings stay bright white below */
.footer .footer-description,
.footer .footer-links a,
.footer .footer-contact li,
.footer .footer-contact li span,
.footer .footer-bottom p,
.footer .footer-bottom-links a {
  color: var(--footer-content);
  font-weight: 500;
  opacity: 1;
  text-shadow: none;
}

.footer .footer-section h3 {
  color: #ffffff;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.footer-top-motto {
  font-family: monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: #3b82f6;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 3rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.05);
}

.footer-top-motto::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #3b82f6;
  border-radius: 50%;
  animation: footer-pulse 2s ease-in-out infinite;
  will-change: opacity, transform;
}

@keyframes footer-pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}

.footer-container {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1.4fr;
  gap: 4rem;
  max-width: 100%;
  width: 100%;
  margin-bottom: 4rem;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1.25rem;
}

.footer-logo-image {
  height: 36px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.95;
  transition: opacity 0.25s ease;
}

.footer-logo:hover .footer-logo-image {
  opacity: 1;
}

.footer-description {
  color: var(--footer-content);
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 300px;
}

.footer-section h3 {
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  padding-bottom: 0.75rem;
}

.footer-section h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, transparent);
  border-radius: 2px;
}

.footer-links, .footer-contact {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--footer-content);
  font-size: 0.9rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  display: inline-block;
}

.footer-links a::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  background: #3b82f6;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.footer-links a:hover {
  color: #93c5fd;
  font-weight: 600;
  transform: translateX(6px);
}

.footer-links a:hover::before {
  opacity: 1;
}

.footer-contact li {
  color: var(--footer-content);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: color 0.25s ease;
}

.footer-contact li a {
  color: inherit;
  transition: color 0.25s ease;
}

.footer-contact li a:hover {
  color: var(--footer-content-hover);
}

.footer-contact li.footer-contact-address {
  align-items: flex-start;
  line-height: 1.55;
}

.footer-contact li.footer-contact-address svg {
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.footer-contact-cta {
  display: inline-flex;
  align-items: center;
  margin-top: 1.25rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.08);
  color: var(--footer-content);
  font-size: 0.85rem;
  font-weight: 500;
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease;
}

.footer-contact-cta:hover {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.55);
  color: var(--footer-content-hover);
}

.footer-contact li svg {
  color: #3b82f6;
  flex-shrink: 0;
  filter: drop-shadow(0 0 3px rgba(59, 130, 246, 0.3));
}

.footer-contact li:hover {
  color: var(--footer-content-hover);
}

.footer-bottom {
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(59, 130, 246, 0.08);
  padding: 1.75rem 6rem;
  color: var(--footer-content);
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.3);
  -webkit-font-smoothing: auto;
}

.footer-bottom-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 100%;
  width: 100%;
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.footer-bottom-link-item {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-bottom-links a {
  color: var(--footer-content);
  transition: color 0.25s ease;
  font-size: 0.8rem;
}

.footer-bottom-links a:hover {
  color: #93c5fd;
}

.footer-divider {
  color: rgba(255, 255, 255, 0.5);
  user-select: none;
}

/* --- Responsive Media Queries --- */
@media (max-width: 1200px) {
  .footer-inner {
    padding: 4rem 4rem 2rem;
  }
  .footer-bottom {
    padding: 1.75rem 4rem;
  }
  .footer-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }
  .brand-section {
    grid-column: span 3;
    margin-bottom: 1rem;
  }
}

@media (max-width: 768px) {
  .footer-inner {
    padding: 3rem 1.5rem 2rem;
  }
  .footer-bottom {
    padding: 1.5rem 1.5rem;
  }
  .footer-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
  .brand-section {
    grid-column: span 2;
  }
  .contact-section {
    grid-column: span 2;
  }
  .footer-bottom-container {
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .brand-section, .contact-section {
    grid-column: span 1;
  }
  .footer-bottom-links {
    flex-direction: column;
    gap: 0.75rem;
  }
  .footer-divider {
    display: none;
  }
}
