body {
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

/* Footer Section */
footer {
  background-color: #000; /* Solid black background */
  color: #fff;
  padding: 10px 20px; /* Reduced padding for a more compact footer */
  text-align: center;
  font-size: 1em;
  width: 100%;
  box-sizing: border-box; /* Ensure padding is included in width calculation */
  overflow: hidden; /* Prevent footer overflow */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 50px; /* Prevent footer from being too tall even with little content */
}

/* Links styling */
footer a {
  color: #f1c40f;
  text-decoration: none;
}

footer a:hover {
  color: #e67e22;
}

/* Unordered list styling */
footer ul {
  list-style: none;
  padding: 0;
  margin: 5px 0; /* Reduced margin to shrink vertical space */
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* Center the items */
}

/* Navigation items */
footer ul li {
  display: inline-block;
  margin-right: 15px; /* Reduced margin between items */
  margin-bottom: 5px; /* Reduced margin for compactness */
}

/* Copyright styling */
footer .copyright {
  text-align: center;
  font-size: 0.85em; /* Slightly smaller font for compactness */
  margin-top: 10px; /* Reduced margin from top */
  text-decoration: underline;
  display: block;
  width: 100%;
}

/* Media Queries for Responsiveness */

/* On smaller screens, stack the list items */
@media (max-width: 768px) {
  footer {
    padding: 10px 15px; /* Further reduced padding */
  }

  footer ul {
    flex-direction: column;
    align-items: center;
    padding-left: 0;
  }

  footer ul li {
    margin-right: 0;
    margin-bottom: 8px; /* Reduced space between items */
  }

  footer .copyright {
    font-size: 0.8em; /* Slightly smaller font for smaller screens */
    margin-top: 8px;
  }
}

/* For extra-small devices (mobile), adjust for full width */
@media (max-width: 480px) {
  footer {
    padding: 8px 12px; /* Reduced padding for mobile */
  }

  footer ul li {
    margin-right: 0;
    margin-bottom: 6px; /* Even smaller space between items */
  }

  footer .copyright {
    font-size: 0.75em; /* Adjust font size for very small screens */
    margin-top: 6px;
  }
}
