header {
  width: 100%;
  height: auto;
  text-align: center;
  margin-bottom: 20px;
}

header img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
}

main {
  display: flex;
  flex-wrap: wrap;
  padding: 20px;
  gap: 20px;
  margin-left: 100px;
}

.right,
.left {
  flex: 1;
  min-width: 280px; /* Adjusted for smaller size */
  max-width: 600px; /* Ensures size respects the header */
  padding: 40px;
  border-radius: 8px;
}

.left {
  background-color: #f8faf8; /* Light grey background */
}

.right {
  background-color: #f4f6f4; /* Light cyan background */
}

.right h2,
.left h2 {
  font-size: 1.8em; /* Slightly smaller font size for smaller divs */
  margin-bottom: 20px;
}

.right img {
  width: 100%;
  height: 250px;
  margin-bottom: 20px;
}

.right p {
  margin-bottom: 20px;
}

form {
  display: flex;
  flex-direction: column;
}

form input,
form textarea {
  margin-bottom: 10px;
  padding: 10px;
  font-size: 1em;
}

form label {
  font-weight: bold;
  margin-bottom: 5px;
}

form button {
  padding: 10px;
  font-size: 1em;
  cursor: pointer;
  margin-top: 10px;
}

@media (max-width: 768px) {
  .right h2,
  .left h2 {
    font-size: 1.5em;
  }
}

/* General Mobile View Adjustments */
@media (max-width: 768px) {
  main {
    margin-left: 0; /* Removes the left margin for smaller screens */
    padding: 10px;
  }

  .right,
  .left {
    flex: 1 1 100%; /* Stacks the divs vertically */
    max-width: 100%; /* Ensures they take up full width */
    padding: 20px;
  }

  header img {
    max-height: 300px; /* Reduces header image height on smaller screens */
  }

  .right h2,
  .left h2 {
    font-size: 1.5em; /* Adjusts font size for better readability on mobile */
  }

  .right img {
    height: 200px; /* Reduces image height for smaller screens */
  }
}

/* Smaller Mobile View Adjustments */
@media (max-width: 480px) {
  main {
    padding: 5px; /* Further reduces padding */
  }

  .right,
  .left {
    padding: 15px; /* Reduces padding for better fit on smaller screens */
  }

  .right h2,
  .left h2 {
    font-size: 1.2em; /* Further adjusts font size */
  }

  header img {
    max-height: 250px; /* Further reduces header image height */
  }

  .right img {
    height: 150px; /* Reduces image height even more */
  }

  form input,
  form textarea {
    font-size: 0.9em; /* Slightly reduces input and textarea font size */
  }

  form button {
    font-size: 0.9em;
  }
}

