/* General styles for the flex layout */
.flex-container {
  display: flex;
  flex-wrap: nowrap;
  width: 80%;
  gap: 20px;
  /*background-color: rgba(255, 255, 255, 0.8);*/
  align-items: center;
  padding: 10px;
  margin-left: auto;
  margin-right: auto;
}

.flex-image {
  border: 1px #fff solid;
  border-radius: 2px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
}
.flex-image img {
  border-radius: 2px;
}
.flex-image,
.flex-text {
  width: 50%; /* Image and text take 50% each on desktop/tablet */
}

section {
  background-color: rgba(255, 255, 255, 0.8);
  padding: 50px 20px 50px 20px;
  width: 100%;
}

section p {
  color: #000 !important;

  font-size: 2rem;
}

/* On mobile (below 768px), stack the image and text vertically */
@media (max-width: 768px) {
  .flex-container {
    flex-direction: column; /* Stack image and text vertically */
    width: 100%;
    padding: 0;
  }

  .flex-image,
  .flex-text {
    width: 100%; /* Take full width when stacked vertically */
  }

  /* Position .p-wrapper at the bottom of the image on mobile */
  .p-wrapper {
    position: absolute;
    bottom: 0;
    padding: 10px;
    width: 100%;
    background-color: rgba(
      255,
      255,
      255,
      0.6
    ); /* Optional: add a background color for readability */
    box-sizing: border-box; /* Make sure padding doesn't affect width */
  }

  figure {
    position: relative; /* Ensures that the absolute positioning of .p-wrapper works */
  }

  /* Ensure the text is inside the wrapper on mobile */
  .flex-text {
    position: relative; /* To keep p-wrapper in place */
  }
}

/* On larger screens (above 768px), display text and image side by side */
@media (min-width: 769px) {
  .flex-container {
    flex-direction: row; /* Keep image and text side by side */
  }
}

#photoblocks-1 {
  width: 100% !important;
  padding: 0 5% 0 5%;
}
