.image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 5px auto; /* Reduced margins */
  width: 80%; /* Full width for container */
}

.image-container figure {
  display: none;
}

.image-container figure.active {
  display: block;
}

.image-container img {
  width: 100%; /* Image scales to the full width of the container */
  max-width: none; /* Remove any maximum width restrictions */
  height: auto; /* Maintain aspect ratio */
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 5px; /* Reduced gap for tighter layout */
}

.pagination button {
  padding: 8px 12px; /* Adjusted padding for smaller buttons */
  border: 1px solid #ccc;
  background-color: #f9f9f9;
  cursor: pointer;
}

.pagination button.active {
  background-color: #007bff;
  color: #fff;
  border-color: #007bff;
}

.pagination button:disabled {
  cursor: not-allowed;
  background-color: #ddd;
  color: #666;
}

figcaption {
  text-align: center;
}

@media (max-width: 780px) {
  .image-container {
    width: 100%; /* Full width for smaller screens */
    margin: 0 auto; /* Center container */
  }

  .image-container img {
    width: 100%; /* Ensure the image always takes up the full width */
    max-width: 100%; /* Prevent any additional scaling */
  }
}
