
.content-area {
  width: 100%;
  max-width: var(--site-max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.left-text-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.left-image-container,
.left-text-container {
  flex: 1 1 50%;
  /* padding: 0 30px; */
}

.left-image-container img {
  width: 100%;
  height: auto;
  max-width: 600px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}


.left-text-container p {
  margin-top: 15px;
  padding: 30px;;
}

.contact-button {
  margin-top: 20px;
  background: black;
  color: var(--background-color);
  border: none;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 1px;
  cursor: pointer;
}

/* Alternating layout for .alt sections */
.content-container.alt .row {
  flex-direction: row-reverse;
}


/******* NEW CSS *********/

.left-text-section {
  display: flex;
  flex-direction: row;
  align-items: stretch; /* Ensure both text and image containers stretch to full height */
  justify-content: space-between;
  background-color: #f9f9f9;
  color: #333;
  height: 70vh; /* Ensure the section has a defined height */
  overflow: hidden;
}

/* Ensure text container has a fixed width */
.left-text-section .text-container {
  flex: 1; /* Allow text to take space but not more than needed */
  max-width: 600px;

  display: flex;
  flex-direction: column;
  justify-content: center;
}

.left-text-section .text-container p {
  line-height: 2rem;
  padding: 10px 60px;
}

.left-text-section .text-container h2,
h3 {
  padding-left: 60px;
}

.left-text-section .text-container .separator2 {
  margin-left: 60px;
}

/* .left-text-section .text-container h3 {
  padding-left: 60px;
} */

/* Image container should always take the full height and width */
.image-container {
  flex: 1; /* Allow it to take available space */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  height: 100%; /* Ensure it fills the section height */
}

/* Image always fills its container */
.image-container img {
  width: 100%; /* Ensures it fully stretches */
  height: 100%; /* Ensures it fully covers */
  object-fit: cover; /* Ensures the image fills the container without distortion */
}


@media (max-width: 1024px) {
  .left-text-section {
    height: auto;            /* no forced 70vh */
    min-height: 0;
  }
}

/* Phones: stack, add padding, keep image tidy */
@media (max-width: 640px) {
  .left-text-section {
    flex-direction: column;  /* text above image (default) */
    border-radius: 0;        /* optional: avoid clipped edges on small screens */
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    background-clip: padding-box;
  }

  .left-text-section .text-container {
    max-width: none;         /* let it span full width */
    padding: 12px 0 16px;    /* outer padding handled by section */
  }

  .left-text-section .text-container p {
    padding: 0;              /* remove big desktop padding */
    line-height: 1.7;
  }

  .left-text-section .text-container h2,
  .left-text-section .text-container h3,
  .left-text-section .text-container .separator2 {
    padding-left: 0;         /* align with mobile edges */
    margin-left: 0;
  }

  .image-container {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;     /* nice mobile crop; change to 1/1 if you prefer square */
    overflow: hidden;
  }

  .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;       /* fills aspect box without distortion */
  }
}

/* OPTIONAL: slightly larger phones / small tablets */
@media (min-width: 641px) and (max-width: 900px) {
  .left-text-section .text-container {
    max-width: none;
    padding: 16px 0 20px;
  }
  .left-text-section .text-container p {
    padding: 0;
    line-height: 1.8;
  }
}

/* OPTIONAL: if you want the IMAGE FIRST on phones, add class .image-first-mobile */
@media (max-width: 640px) {
  .left-text-section.image-first-mobile {
    flex-direction: column-reverse; /* image above text on phones */
  }
}
