/* ===============================
   Footer Base Styles
=============================== */
footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 60px 40px 30px 40px;
  font-family: "Poppins", sans-serif;
  transition: background 0.4s ease, color 0.4s ease;
  opacity: 0;
  transform: translateY(30px);
  animation: footerFadeIn 0.8s ease forwards;
  animation-delay: 0.3s;
}

/* Footer container: horizontal layout, equal height, centered */
.footer-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: nowrap;
  max-width: 1200px;
  margin: auto;
  gap: 40px;
  align-items: stretch; /* equal height for all sections */
}

/* Each section */
.footer-container > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center; /* vertical center */
  padding: 0 10px;
  opacity: 0;
  transform: translateY(20px);
  animation: footerChildFadeIn 0.6s ease forwards;
}

/* Headings */
.footer-container h3, .footer-container h4 {
  color: var(--footer-heading);
  margin-bottom: 15px;
  font-size: 18px;
}

/* Text and links */
.footer-container p, 
.footer-container ul li, 
.footer-container a {
  color: var(--footer-text);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.6;
}

/* Quick Links */
.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links ul li {
  margin-bottom: 8px;
}

.footer-links ul li a {
  position: relative;
  transition: color 0.3s ease;
}

.footer-links ul li a::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--nav-hover);
  transition: width 0.3s ease;
}

.footer-links ul li a:hover::after {
  width: 100%;
}

/* Social Media section: vertical icons, bullet-free */
.footer-social .social-icons {
  list-style: none; /* remove bullets */
  padding: 0;
  margin: 10px 0 0 0;
  display: flex;
  flex-direction: column; /* stack icons top-to-bottom */
  gap: 12px;
  align-items: flex-start; /* left-align icons */
}

.footer-social .social-icons a {
  display: inline-flex;
  align-items: center;
  transform: translateX(0);
  transition: transform 0.3s ease, scale 0.3s ease;
}

.footer-social .social-icons a img {
  width: 24px;
  height: 24px;
  margin-right: 8px;
}

/* Stagger hover animation for social icons */
.footer-social .social-icons a:nth-child(1) { --delay: 0ms; }
.footer-social .social-icons a:nth-child(2) { --delay: 50ms; }
.footer-social .social-icons a:nth-child(3) { --delay: 100ms; }
.footer-social .social-icons a:nth-child(4) { --delay: 150ms; }
.footer-social .social-icons a:nth-child(5) { --delay: 200ms; }
.footer-social .social-icons a:nth-child(6) { --delay: 250ms; }

.footer-social.hovered .social-icons a {
  transform: translateX(5px) scale(1.1);
  transition-delay: var(--delay);
}

/* Footer bottom */
.footer-bottom {
  text-align: center;
  margin-top: 40px;
  border-top: 1px solid var(--footer-border);
  padding-top: 15px;
  font-size: 13px;
  color: var(--footer-text-light);
}

/* Entrance animation */
.footer-container > div:nth-child(1) { animation-delay: 0.5s; }
.footer-container > div:nth-child(2) { animation-delay: 0.7s; }
.footer-container > div:nth-child(3) { animation-delay: 0.9s; }
.footer-container > div:nth-child(4) { animation-delay: 1.1s; }

@keyframes footerFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes footerChildFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive: stack sections on mobile */
@media (max-width: 900px) {
  .footer-container {
    flex-direction: column;
    gap: 30px;
    text-align: center;
    align-items: center;
  }

  .footer-container > div {
    justify-content: flex-start;
    padding: 0;
  }

  .footer-social .social-icons {
    flex-direction: row; /* horizontal on mobile */
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 5px;
    align-items: center;
  }
}

/* ===============================
   Light/Dark Mode Variables
=============================== */
:root {
  --footer-bg: #0d1b2a;
  --footer-text: #fff;
  --footer-heading: #ffd60a;
  --footer-border: #415a77;
  --footer-text-light: #ccc;
  --nav-hover: #ffcc00;
}
