/* Footer Base */
#footer {
  background: linear-gradient(135deg, #1A4D8F, #5BB0FF);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  position: relative;
  overflow: hidden;
  padding-top: 4rem;
}

/* Footer Top Section */
.footer-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: auto;
  padding: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

/* Footer Brand */
.footer-brand h3 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.footer-brand p {
  margin-bottom: 1.5rem;
  line-height: 1.6;
  color: #e0e0e0;
}

/* Social Icons */
.socials {
  display: flex;
  gap: 0.8rem;
  justify-content: flex-start;
}
.socials a img {
  width: 45px;
  height: 45px;
  transition: transform 0.3s, filter 0.3s;
  border-radius: 50%;
  border: 2px solid #fff;
  padding: 5px;
  background: rgba(255,255,255,0.1);
}
.socials a img:hover {
  transform: scale(1.2) rotate(10deg);
  filter: drop-shadow(0 0 8px #FFD700);
}

/* Footer Links */
.footer-links h4, .footer-newsletter h4, .footer-contact h4 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  letter-spacing: 0.5px;
}
.footer-links ul {
  list-style: none;
  padding: 0;
}
.footer-links ul li a {
  text-decoration: none;
  color: #f0f0f0;
  display: block;
  margin-bottom: 0.6rem;
  transition: all 0.3s;
}
.footer-links ul li a:hover {
  color: #FFD700;
  transform: translateX(5px);
}

/* Newsletter Form */
.footer-newsletter form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}
.footer-newsletter input {
  padding: 0.6rem 1rem;
  border-radius: 50px;
  border: none;
  flex: 1;
  outline: none;
  transition: all 0.3s;
}
.footer-newsletter input:focus {
  box-shadow: 0 0 10px #FFD700;
}
.footer-newsletter button {
  padding: 0.6rem 1.5rem;
  background: #FFD700;
  color: #1A4D8F;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
}
.footer-newsletter button:hover {
  transform: scale(1.05);
  background: #fff;
  color: #1A4D8F;
}

/* Contact */
.footer-contact p {
  margin-bottom: 0.7rem;
  color: #e0e0e0;
}

/* Footer Bottom */
.footer-bottom {
  text-align: center;
  padding: 1.5rem 2rem;
  font-size: 0.9rem;
  position: relative;
  background: rgba(0,0,0,0.1);
}

/* Back-to-top Button */
#back-to-top {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  background: #FFD700;
  border: none;
  color: #1A4D8F;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.2rem;
  transition: all 0.3s;
}
#back-to-top:hover {
  transform: translateY(-50%) scale(1.2) rotate(15deg);
  box-shadow: 0 0 15px #FFD700;
}

/* -------------------------------- */
/* Responsive Styles for Devices */
/* -------------------------------- */

/* Tablets (768px - 991px) */
@media (max-width: 991px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    text-align: center;
    padding: 2rem 1rem;
  }
  .footer-newsletter form, .socials {
    justify-content: center;
  }
  #back-to-top {
    position: static;
    margin: 1rem auto 0 auto;
  }
}

/* Mobile (up to 767px) */
@media (max-width: 767px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
  }
  .footer-links ul li a {
    font-size: 0.95rem;
  }
  .footer-newsletter input, .footer-newsletter button {
    width: 100%;
  }
  .socials {
    justify-content: center;
  }
}

/* Small Mobile (up to 480px) */
@media (max-width: 480px) {
  .footer-brand h3 {
    font-size: 1.6rem;
  }
  .footer-links h4, .footer-newsletter h4, .footer-contact h4 {
    font-size: 1rem;
  }
  .footer-links ul li a {
    font-size: 0.9rem;
  }
  .footer-newsletter input, .footer-newsletter button {
    padding: 0.5rem;
  }
  #back-to-top {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}
