/* ==========================================
   MODERN FOOTER - Clean & Professional Design
   ========================================== */

/* CSS Variables Fallback */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --accent-dark: #2563eb;
  --border: #e2e8f0;
}

/* Footer Container - Clean Light Design */
.site-footer,
.site-footer.site-footer--textured {
  background: linear-gradient(180deg, 
    #ffffff 0%, 
    #f8fafc 50%,
    #f1f5f9 100%);
  position: relative;
  overflow: hidden;
  border-top: 4px solid #3b82f6;
  padding: 60px 0 0;
}

/* Hide old decorative elements that don't fit new design */
.footer-corner,
.footer-particles {
  display: none;
}

/* Animated Top Border */
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, 
    #3b82f6 0%, 
    #60a5fa 50%, 
    #3b82f6 100%);
  animation: borderSlide 4s ease-in-out infinite;
}

@keyframes borderSlide {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: -100%; }
}

/* Floating Decorative Elements */
.site-footer::after {
  content: '';
  position: absolute;
  top: 20%;
  right: 5%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  animation: floatBubble 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes floatBubble {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.1); }
}

/* Footer Content */
.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  position: relative;
  z-index: 1;
}

/* Footer Logo Section */
.footer-logo {
  margin-bottom: 20px;
}

.footer-logo img {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  transition: transform 0.3s ease;
}

.footer-logo img:hover {
  transform: scale(1.1) rotate(5deg);
}

.footer-logo h3 {
  color: #1e293b;
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 12px 0;
}

.footer-logo p {
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

/* Footer Links Section */
.footer-section h4 {
  color: #1e293b;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 20px 0;
  position: relative;
  padding-bottom: 10px;
}

.footer-section h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.footer-section:hover h4::after {
  width: 60px;
}

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

.footer-section ul li {
  margin-bottom: 12px;
}

.footer-section ul li a {
  color: #64748b;
  text-decoration: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  position: relative;
  padding-left: 0;
}

.footer-section ul li a::before {
  content: '';
  position: absolute;
  left: -15px;
  width: 6px;
  height: 6px;
  background: #3b82f6;
  border-radius: 50%;
  opacity: 0;
  transition: all 0.3s ease;
}

.footer-section ul li a:hover {
  color: #3b82f6;
  padding-left: 15px;
}

.footer-section ul li a:hover::before {
  opacity: 1;
  left: 0;
}

/* Social Links - Support both old and new class names */
.social-links,
.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.social-links a,
.footer-social a,
.social-link {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #f1f5f9;
  border: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.social-links a::before,
.footer-social a::before,
.social-link::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

.social-links a:hover,
.footer-social a:hover,
.social-link:hover {
  border-color: #3b82f6;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.social-links a:hover::before,
.footer-social a:hover::before,
.social-link:hover::before {
  width: 100%;
  height: 100%;
}

.social-links a svg,
.footer-social a svg,
.social-link svg {
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
}

.social-links a:hover svg,
.footer-social a:hover svg,
.social-link:hover svg {
  color: white;
}

/* Newsletter Section */
.newsletter-form {
  margin-top: 20px;
}

.newsletter-form .form-group {
  display: flex;
  gap: 8px;
}

.newsletter-form input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: white;
}

.newsletter-form input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.newsletter-form button {
  padding: 12px 20px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.newsletter-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

/* Contact Info */
.contact-info {
  margin-top: 20px;
}

.contact-info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: #64748b;
  font-size: 14px;
  transition: all 0.3s ease;
}

.contact-info-item:hover {
  color: #3b82f6;
  transform: translateX(5px);
}

.contact-info-item svg {
  width: 20px;
  height: 20px;
  color: #3b82f6;
  flex-shrink: 0;
}

/* Footer Bottom */
.footer-bottom {
  margin-top: 50px;
  padding: 25px 20px;
  border-top: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.footer-bottom-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-bottom p {
  color: #64748b;
  font-size: 14px;
  margin: 0;
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
}

.footer-bottom-links a {
  color: #64748b;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
}

.footer-bottom-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #3b82f6;
  transition: width 0.3s ease;
}

.footer-bottom-links a:hover {
  color: #3b82f6;
}

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

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
  z-index: 1000;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

.scroll-to-top:active {
  transform: translateY(-2px) scale(1.05);
}

/* Additional Floating Elements */
.footer-decoration {
  position: absolute;
  bottom: 20%;
  left: 3%;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
  border-radius: 50%;
  animation: floatBubble 10s ease-in-out infinite reverse;
  pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .site-footer {
    padding: 40px 0 0;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }
  
  .footer-section h4::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .footer-section ul li a {
    justify-content: center;
  }
  
  .social-links {
    justify-content: center;
  }
  
  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-bottom-links {
    justify-content: center;
  }
  
  .newsletter-form .form-group {
    flex-direction: column;
  }
  
  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }
}

/* Loading Animation for Footer */
.footer-content > * {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

.footer-content > *:nth-child(1) { animation-delay: 0.1s; }
.footer-content > *:nth-child(2) { animation-delay: 0.2s; }
.footer-content > *:nth-child(3) { animation-delay: 0.3s; }
.footer-content > *:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================
   OLD FOOTER STRUCTURE SUPPORT
   ========================================== */

/* Support old footer HTML structure */
.footer-main,
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Simple footer-inner styling for hardcoded footers */
.site-footer .footer-inner {
  padding: 40px 20px;
  text-align: center;
}

.site-footer .footer-inner p {
  color: var(--text-secondary, #64748b);
  font-size: 14px;
  margin: 0;
  line-height: 1.6;
}

.site-footer .footer-inner a {
  color: var(--accent, #3b82f6);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.site-footer .footer-inner a:hover {
  color: var(--accent-dark, #2563eb);
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  padding: 40px 0;
}

.footer-col {
  position: relative;
}

.footer-col h4 {
  color: #1e293b;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 20px 0;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 2px;
}

.footer-col p {
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 12px 0;
}

.footer-col p.muted {
  color: #94a3b8;
}

/* Footer links navigation */
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: #64748b;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
  position: relative;
  padding-left: 0;
}

.footer-links a:hover {
  color: #3b82f6;
  padding-left: 12px;
}

.footer-links a::before {
  content: '';
  position: absolute;
  left: -12px;
  width: 6px;
  height: 6px;
  background: #3b82f6;
  border-radius: 50%;
  opacity: 0;
  transition: all 0.3s ease;
  top: 50%;
  transform: translateY(-50%);
}

.footer-links a:hover::before {
  opacity: 1;
  left: 0;
}

/* Footer highlights list */
.footer-highlights {
  list-style: none;
  padding: 0;
  margin: 16px 0 0 0;
}

.footer-highlights li {
  color: #64748b;
  font-size: 13px;
  margin-bottom: 8px;
  line-height: 1.5;
}

/* Footer contact section */
.footer-contact p {
  margin-bottom: 8px;
}

.footer-contact strong {
  color: #1e293b;
}

.footer-contact a {
  color: #3b82f6;
  text-decoration: none;
}

.footer-contact a:hover {
  text-decoration: underline;
}

/* Footer legal section */
.footer-legal {
  border-top: 1px solid #e2e8f0;
  padding: 24px 0;
  margin-top: 0;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.footer-legal p {
  color: #64748b;
  font-size: 14px;
  text-align: center;
  margin: 0;
}

.footer-legal a {
  color: #3b82f6;
  text-decoration: none;
}

.footer-legal a:hover {
  text-decoration: underline;
}

/* Footer newsletter old style */
.footer-newsletter {
  margin-top: 16px;
}

.footer-newsletter h5 {
  color: #1e293b;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.footer-newsletter form {
  display: flex;
  gap: 8px;
}

.footer-newsletter input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
}

.footer-newsletter button {
  padding: 8px 16px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.footer-newsletter button:hover {
  background: #2563eb;
}

/* Footer logo old style */
a.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  text-decoration: none;
}

.footer-logo img {
  width: 40px;
  height: 40px;
  transition: transform 0.3s ease;
}

a.footer-logo:hover img {
  transform: scale(1.1) rotate(5deg);
}

.footer-logo span {
  color: #1e293b;
  font-size: 20px;
  font-weight: 700;
}
