/* Section styling */
.anistonavcompany-media-section {
  display: flex;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  height: 100vh;
  max-height: 600px;
  gap: 10px;
  position: relative;
  overflow: hidden;
  justify-content: space-between;
  flex-wrap: wrap;
  /* Allow containers to wrap on smaller screens */
}

/* Left and Right container */
.anistonavcompany-left-container,
.anistonavcompany-right-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  /* Prevent image overflow */
  padding: 0;
  /* Ensure no padding is added */
}

/* Image styles */
.anistonavcompany-left-image,
.anistonavcompany-right-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Ensures the image covers the container without distortion */
  position: relative;
}

/* Overlay text */
.anistonavcompany-overlay-text {
  position: absolute;
  top: 0;
  left: 0;
  color: #fff;
  text-align: left;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 20px;
  width: 100%;
  /* Make sure overlay takes the full width */
}

.anistonavcompany-overlay-text h2.anistonavcompany-heading {
  font-size: 2rem;
  /* Reduce font size */
  margin-bottom: 5px;
  /* Reduce bottom margin */
  font-weight: 100;
  font-family: "Avenir55Roman", sans-serif;
  left: 20%;
  width: 50%;
  /* Optionally limit the width to reduce text area */
}

/* Overlay text */
.anistonavcompany-overlay-text-2 {
  position: absolute;
  top: 0;
  right: 0;
  /* Align overlay container to the right side */
  color: #fff;
  text-align: left;
  /* Align text to the right */
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-end;
  /* Align text to the right end of the container */
  padding: 20px;
  width: 100%;
  /* Ensure the overlay takes the full width */
}

.anistonavcompany-overlay-text-2 h2.anistonavcompany-heading-2 {
  font-size: 2rem;
  /* Font size */
  margin-bottom: 5px;
  /* Reduce bottom margin */
  font-weight: 100;
  font-family: "Avenir55Roman", sans-serif;
  width: 50%;
  /* Limit width of text */
  text-align: left;
  /* Align text within the container */
}

/* Responsive styling for mobile and tablet */
@media (max-width: 768px) {
  .anistonavcompany-media-section {
    flex-direction: column;
    height: auto;
    padding: 0;
    margin: 0;
  }

  .anistonavcompany-left-container,
  .anistonavcompany-right-container {
    width: 100%;
    padding: 0;
    /* Remove any extra padding */
  }

  .anistonavcompany-overlay-text h2.anistonavcompany-heading {
    font-size: 1rem;
    line-height: 1.2;
  }

  .anistonavcompany-overlay-text-2 h2.anistonavcompany-heading-2 {
    font-size: 1rem;
    line-height: 1.2;
  }

  .anistonavcompany-left-image,
  .anistonavcompany-right-image {
    height: 100%;
    /* Ensure the images take full height on mobile */
    object-fit: cover;
    /* Keeps the aspect ratio without stretching */
  }
}
