/* Footer Styles */

.footer {
  background-color: var(--primary);
  color: var(--white);
  padding-top: var(--space-xl);
  margin-top: auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--white);
}

.footer-logo span {
  color: var(--accent-light);
}

.footer-description {
  color: var(--gray);
  margin-bottom: var(--space-md);
  line-height: 1.6;
}

.social-links {
  display: flex;
  gap: var(--space-md);
}

.social-link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--white);
  transition: var(--transition-fast);
  text-decoration: none;
}

.social-link:hover {
  background-color: var(--accent);
  transform: translateY(-2px);
}

.social-link:focus {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}

.social-link svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.footer-heading {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--white);
  position: relative;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-link {
  color: var(--gray);
  transition: var(--transition-fast);
  text-decoration: none;
  padding: 0.25rem 0;
}

.footer-link:hover {
  color: var(--white);
  text-decoration: underline;
  padding-left: 0.25rem;
}

.footer-link:focus {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
  border-radius: var(--border-radius);
}

.footer-bottom {
  padding: var(--space-md) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: var(--gray);
  font-size: var(--font-sm);
}

/* Mobile Footer Accordion */
@media (max-width: 768px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    text-align: center;
  }

  .footer-top > div {
    margin-bottom: var(--space-md);
  }

  .social-links {
    justify-content: center;
  }

  .footer-links {
    align-items: center;
  }

  /* Accordion Styles for Mobile */
  .footer-heading {
    cursor: pointer;
    padding: var(--space-sm) 0;
    border-radius: var(--border-radius);
    transition: background-color var(--transition-fast);
  }

  .footer-heading:hover {
    background-color: rgba(255, 255, 255, 0.05);
  }

  .footer-heading::after {
    content: '+';
    float: right;
    font-size: 1.25rem;
    transition: transform var(--transition-fast);
  }

  .footer-heading.active::after {
    transform: rotate(45deg);
  }

  .footer-links {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
  }

  .footer-heading.active + .footer-links {
    max-height: 200px;
  }

  /* Skip first column (company info) from accordion */
  .footer-top > div:first-child .footer-heading {
    cursor: default;
    pointer-events: none;
  }

  .footer-top > div:first-child .footer-heading::after {
    display: none;
  }

  .footer-top > div:first-child .footer-links {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 992px) {
  .footer-top {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }
}

/* Newsletter Signup (if added) */
.newsletter-signup {
  margin-top: var(--space-md);
}

.newsletter-form {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.newsletter-input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius);
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

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

.newsletter-btn {
  padding: 0.5rem 1rem;
  background-color: var(--accent);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition-fast);
}

.newsletter-btn:hover {
  background-color: var(--accent-light);
}

/* Footer Links with Icons */
.footer-link-with-icon {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.footer-link-with-icon svg {
  width: 0.875rem;
  height: 0.875rem;
  opacity: 0.7;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  background-color: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-fast);
  z-index: 1000;
}

.back-to-top:hover {
  background-color: var(--accent-light);
  transform: translateY(-2px);
}

.back-to-top.show {
  display: flex;
  animation: fadeInUp 0.3s ease-out;
}

.back-to-top svg {
  width: 1.25rem;
  height: 1.25rem;
}