/* Basic Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body Style */
body {
  font-family: "Times New Roman", serif;
  background-color: #f4f4f4;
  color: black;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-direction: column;
  height: 100vh;
  margin: 20px;
  padding: 20px;
  text-align: center;
}

/* Main Container */
.container {
  max-width: 1200px; /* Ensures a reasonable max width for larger screens */
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

/* Gallery Heading */
h1 {
  font-size: 36px;
  margin-bottom: 20px;
  color: #333;
}

/* Gallery Container */
.gallery-container {
  display: flex;
  flex-direction: column; /* Stack images vertically */
  align-items: center;
  justify-content: center;
  gap: 20px; /* Space between images */
  width: 100%;
  max-width: 900px; /* Ensure no wide images on large screens */
  margin: 0 auto;
}

/* Gallery Item */
.gallery-item {
  width: 100%;
  max-width: 800px; /* Ensures items are not too wide */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: justify; /* Justify text for readability */
}

/* Image Style */
.gallery-img {
  width: 100%; /* Ensure images fill their container */
  max-width: 800px; /* Limit max width for larger screens */
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 10px;
  object-fit: cover; /* Ensures images cover the space without distortion */
}

/* Caption Style */
.caption {
  font-size: 16px;
  color: #555;
  text-align: center; /* Ensure captions are centered */
  padding: 0 10px;
  max-width: 800px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  h1 {
    font-size: 28px; /* Smaller heading size for mobile */
  }
  .gallery-container {
    gap: 15px; /* Less space between items on smaller screens */
  }
  .gallery-item {
    width: 100%;
    max-width: 100%; /* Make gallery items take full width on mobile */
  }
  .gallery-img {
    max-width: 100%; /* Ensure images resize on small screens */
  }
}
