/* CSS Variables for color scheme */
:root {
  --footer-background: #ffffffb7; /* Light background with 90% opacity */
  --footer-hover-background: #b3b3b3b7; /* Darker background for hover with 90% opacity */
  --text-color: #365E32; /* Text color */
  --hover-text-color: #548f4f; /* Hover and focus state color */
}

/* Ensure the body and html take full height */
body, html {
  /* height: 100%; */
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Flex container for main content */
.content-wrapper {
  flex: 1; /* Takes up available space to push footer down */
}

/* Footer styling to stick at the bottom */
footer {
  background-color: var(--footer-background);
  color: var(--text-color);
  padding: 20px 10px;
  display: flex;
  justify-content: space-around;
  align-items: flex-start; /* Aligns sections to the top */
  flex-wrap: wrap;
  text-align: center;
  width: 100%;
  flex-shrink: 0;
}

/* Footer section styling */
footer section {
  flex: 1 1 200px;
  margin: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

footer h2 {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--text-color);
}

footer p, footer address {
  font-size: 14px;
  line-height: 1.4;
  margin: 0;
}

/* Link and hover styles */
footer a {
  color: inherit;
  text-decoration: none;
}

footer a:hover, footer a:focus {
  color: var(--hover-text-color);
  text-decoration: underline;
}

/* Social media links styling */
footer nav {
  display: flex;
  justify-content: center;
  gap: 10px; /* Adds space between icons */
}

footer nav a img {
  width: 24px;
  height: auto;
}

/* Copyright section */
.copyright {
  text-align: center;
  background-color: var(--footer-hover-background);
  color: var(--text-color);
  padding: 10px 0;
  font-size: 12px;
  width: 100%;
}

/* Scroll to top link */
a.scrollToTop {
  text-align: center;
  display: inline-block;
  position: fixed;
  right: 20px;
  bottom: 20px;
  background-color: var(--footer-background);
  color: var(--text-color);
  padding: 4px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  text-decoration: none;
  display: none;
}

a.scrollToTop:hover {
  background-color: var(--footer-hover-background);
}

.fa-chevron-up {
  color: var(--text-color);
}

/* Responsive design adjustments */
@media (max-width: 768px) {
  footer {
    flex-direction: column;
    align-items: center;
  }

  footer section {
    flex: 1 0 100%;
    margin: 10px 0;
  }
}

@media (max-width: 480px) {
  footer {
    padding: 15px 5px;
  }

  footer h2 {
    font-size: 16px;
  }

  footer p, footer address {
    font-size: 12px;
  }

  footer nav a img {
    width: 20px;
  }
}
