/* Main Footer */
.main-footer {
  background: linear-gradient(135deg, var(--primary), #000000);
  background-size: 300% 300%;
  animation: gradientShift 15s ease infinite;
  color: var(--secondary);
  padding: var(--spacing-xl) var(--spacing-md);
  border-top-left-radius: var(--border-radius-lg);
  border-top-right-radius: var(--border-radius-lg);
  box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* Animated gradient background */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Subtle particle effect overlay */
.main-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 2px, transparent 2px);
  background-size: 30px 30px;
  opacity: 0.4;
  z-index: -1;
}

.footer-content {
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
  position: relative;
}

.footer-section {
  text-align: center;
  transition: transform 0.3s ease-out;
}

.footer-section:hover {
  transform: translateY(-5px);
}

.footer-section h3 {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: var(--spacing-md);
  position: relative;
  padding-bottom: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.footer-section h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background-color: var(--accent);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.footer-section:hover h3::after {
  width: 70px;
}

.footer-section p {
  color: var(--secondary);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: var(--spacing-md);
  opacity: 0.9;
}

/* Footer Links */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: var(--spacing-sm);
  transition: transform 0.2s ease;
}

.footer-links li:hover {
  transform: translateX(5px);
}

.footer-links a {
  color: var(--secondary);
  text-decoration: none;
  font-size: 1.05rem;
  transition: all var(--transition-speed);
  display: inline-block;
  position: relative;
  padding-left: 5px;
}

.footer-links a::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-links a:hover::before {
  width: 100%;
}

/* Social Icons */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-top: var(--spacing-md);
}

.social-icon {
  width: 46px;
  height: 46px;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-size: 1.2rem;
  position: relative;
  overflow: hidden;
}

.social-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--accent);
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: -1;
}

.social-icon:hover {
  color: var(--primary);
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.social-icon:hover::before {
  transform: scale(1);
}

/* Footer Bottom */
.footer-bottom {
  text-align: center;
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.5px;
}

/* Newsletter Form (if needed) */
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
}

.newsletter-form input {
  padding: 12px 16px;
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--secondary);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--accent);
  background-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.2);
}

.newsletter-form button {
  padding: 12px 18px;
  border-radius: var(--border-radius-md);
  background-color: var(--accent);
  color: var(--primary);
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  transform-origin: center;
}

.newsletter-form button:hover {
  transform: scale(1.03);
  box-shadow: 0 5px 15px rgba(var(--accent-rgb), 0.3);
}

/* Back to top button */
.back-to-top {
  position: absolute;
  right: 20px;
  bottom: 100px;
  width: 50px;
  height: 50px;
  background-color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
/* Mobile (default) */
@media (max-width: 599px) {
  .footer-section {
    margin-bottom: var(--spacing-md);
  }
  
  .footer-section h3::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .social-icons {
    flex-wrap: wrap;
  }
  
  .newsletter-form {
    max-width: 100%;
  }
}

/* Tablet */
@media (min-width: 600px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    text-align: left;
    gap: var(--spacing-xl);
  }
  
  .footer-section {
    text-align: left;
  }
  
  .footer-section h3::after {
    left: 0;
    transform: none;
  }
  
  .social-icons {
    justify-content: flex-start;
  }
  
  .newsletter-form {
    flex-direction: row;
  }
  
  .newsletter-form input {
    flex: 1;
  }
}

/* Desktop */
@media (min-width: 900px) {
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);
  }
  
  .main-footer {
    padding: var(--spacing-xl) var(--spacing-xl);
  }
  
  .footer-section:last-child {
    grid-column: span 1;
  }
}

/* Large Desktop */
@media (min-width: 1200px) {
  .main-footer {
    padding: var(--spacing-xxl) var(--spacing-xl);
  }
  
  .footer-content {
    gap: var(--spacing-xxl);
  }
  
  .footer-section h3 {
    font-size: 1.6rem;
  }
}