/* Footer styles */
footer {
  background-color: var(--light-gray);
  padding: 2rem 0rem 0rem 0rem;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.footer-container {
  max-width: 100vw;
  height: 400px;
  max-height: 100%;
  width: 100%;
  position: relative;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  z-index: 2;
}

/* Content layout */
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
}

/* Left section - Canadian Badge */
.support-badge {
  flex: 0 0 auto;
  position: absolute;
  top: 0;
  left: 5rem;
  opacity: 0.5;
  rotate: -10deg;
}

.support-badge img {
  height: 40px;
  width: auto;
}

/* Center section */
.footer-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 auto;
  gap: 1rem;
}

/* Logo */
.logo {
  margin-bottom: 1rem;
}

.logo img {
  width: 60px;
  height: auto;
}

/* Social media links */
.social-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 1.5rem;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  list-style: none;
  text-decoration: none;
}

.social-link i {
  font-size: 14px;
  color: var(--green);
}

.social-link:hover {
  background-color: var(--green);
}

.social-link:hover i {
  color: var(--white);
}
/* Navigation */
.footer-nav {
  display: grid;
  grid-template-columns: repeat(7, auto); /* 6 columns for large screens */
  justify-content: center;
  gap: 1rem 2.5rem;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.footer-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s;
  text-align: center;
  font-weight: 500;
  padding: 0.5rem 0;
}

.footer-nav a:hover {
  color: var(--green);
}

/* Media query for small screens */
@media screen and (max-width: 768px) {
  .footer-nav {
    grid-template-columns: repeat(2, 1fr); /* 2 columns for small screens */
    grid-template-rows: repeat(3, auto); /* 3 rows */
    gap: 0.75rem;
    padding: 0 1rem;
  }

  .footer-nav a:last-child {
    grid-column: 1 / -1;
    justify-self: center;
  }
}

/* Even smaller screens */
@media screen and (max-width: 480px) {
  .footer-nav {
    gap: 0.5rem;
  }
}

/* Right section - Download */
.download-section {
  flex: 0 0 auto;
  text-align: center;
  position: absolute;
  right: 5rem;
  bottom: -7rem;
}

.download-heading {
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.download-buttons {
  display: flex;
  flex-direction: row;
  gap: 5px;
}

.download-button {
  height: 40px;
}

/* Bottom section */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 3rem;
  background-color: #d9d9d9;
  width: 100%; /* Ensure it takes full width */
}

.copyright {
  font-size: 0.75rem;
  color: var(--text);
  padding-left: 1rem; /* Add some padding for the text */
}

.legal-links {
  font-size: 0.75rem;
  padding-right: 1rem; /* Add some padding for the links */
}

.legal-links a {
  color: var(--text);
  text-decoration: none;
}

/* Background watermark */
.watermark {
  position: absolute;
  bottom: 2.5rem;
  left: 0;
  width: 300px;
  pointer-events: none;
}

/* Media queries for responsiveness */
@media screen and (max-width: 768px) {
  .footer-container {
    height: 500px; /* Allow height to be dynamic on smaller screens */
    padding: 0rem 0rem;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .support-badge {
    margin-bottom: 1.5rem;
  }

  .footer-center {
    margin-bottom: 1.5rem;
    order: -1;
  }

  /* Content layout */
  .footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
  }

  /* Left section - Canadian Badge */
  .support-badge {
    flex: 0 0 auto;
    position: absolute;
    top: 0;
    left: 5rem;
    opacity: 0.5;
    rotate: -10deg;
  }

  .support-badge img {
    height: 40px;
    width: auto;
  }

  /* Center section */
  .footer-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 auto;
    gap: 1rem;
  }

  /* Right section - Download */
  .download-section {
    flex: 0 0 auto;
    text-align: center;
    position: absolute;
    right: 5rem;
    bottom: -2rem;
  }

  .download-heading {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
  }

  .download-buttons {
    display: flex;
    flex-direction: row;
    gap: 5px;
  }

  .download-button {
    height: 30px;
  }

  /* Media queries for responsiveness */
  @media screen and (max-width: 768px) {
    .footer-container {
      height: auto; /* Allow height to be dynamic on smaller screens */
      padding: 0rem 0rem;
    }

    .footer-content {
      flex-direction: column;
      align-items: center;
      text-align: center;
    }

    /* Remove absolute positioning for mobile */
    .support-badge {
      position: absolute;
      left: 1rem;
    }
    .support-badge img {
      height: 30px;
    }

    .footer-center {
      margin-bottom: 1.5rem;
      order: -1;
    }
    .download-section {
      position: static;
      margin-bottom: 2rem;
      margin-top: 2rem;
      text-align: center;
    }

    .download-buttons {
      flex-direction: row;
      justify-content: center;
    }
    .footer-bottom {
      flex-direction: column-reverse;
      gap: 0.5rem;
      padding: 1rem;
    }

    .copyright,
    .legal-links {
      padding: 0;
    }

    .watermark {
      position: absolute;
      bottom: 4rem;
      left: 0;
      width: 100%;
      pointer-events: none;
    }
  }

  @media screen and (max-width: 480px) {
    .download-buttons {
      flex-direction: row;
      align-items: center;
    }
  }
}
