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

/* Body styling */
body {
  font-family: Arial, sans-serif;
  background-color: #efff95;
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-y: auto; /* Allow scrolling */
}

/* Container styling */
.container {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Creates 2 equal columns */
  gap: 30px;
  align-items: center;
  width: 100%;
  max-width: 100vw;
  padding: 20px; /* Add padding to avoid content sticking to the edges */
}

/* Each image with text */
.image-text-row {
  display: flex;
  align-items: center;
  cursor: default;
  gap: 20px;
  width: 100%;
  justify-content: flex-start; /* Align content to the left */
}

/* Image styling */
.image {
  width: 50%; 
  height: auto;
  object-fit: cover;
  margin-left: 0; /* Ensure images align to the left of the column */
}

.image:hover {
  cursor: pointer;
}

/* Fullscreen image styling */
.fullscreen {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: auto; /* Let the image's width adjust automatically */
  max-width: 100vw;
  max-height: 99vh; /* Prevents the image from being taller than the screen */
  object-fit: contain;
  z-index: 10;
}

/* Overlay styling */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(239, 255, 149, 0.8); /* Slightly transparent background */
  z-index: 5;
  display: none;
}

/* Prevent scrolling when an image is expanded */
body.no-scroll {
  overflow: hidden;
}

/* Media query for mobile devices */
@media only screen and (max-width: 768px) {
  header h1 {
      font-size: 15px; /* Smaller font size for mobile */
  }

  main {
      padding: 0rem; /* Reduced padding for smaller screens */
  }

  .container {
    display: grid;
    grid-template-columns: repeat(1, 1fr); /* Switch to a single column for small screens */
    gap: 30px;
    align-items: center;
    width: 80%;
    max-width: 100vw;
    padding: 20px; /* Add padding to avoid content sticking to the edges */
  }
}
