.block-page-media-and-text {
  background-color: rgb(var(--background-color));
  color: rgb(var(--font-color));
  overflow-x: clip;

  .wrapper {
    width: 100%;
    display: grid;
    gap: 3rem;
    
    @media (max-width: 1199px) {
      grid-template-columns: 1fr;
      grid-template-rows: auto auto;
      height: auto;
      padding: var(--content-padding);
      gap: 2rem;
      
      .media-wrapper {
        order: 2 !important;
      }
      
      .text-wrapper {
        order: 1 !important;
      }
    }
    
    @media (min-width: 1200px) {
      height: var(--section-height);
      grid-template-columns: 1fr 1fr;
      grid-template-rows: 1fr;
    }
  }

  .media-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    
    @media (max-width: 1199px) {
      max-width: 600px;
      margin: 0 auto;
      aspect-ratio: 16 / 9;
    }
    
    @media (min-width: 1200px) {
      height: 100%;
      order: var(--media-order);
    }

    .block-page-media {
      width: 100%;
      height: 100%;
    }

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center;
    }

    video {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center;
    }

  }

  .text-wrapper {
    width: 100%;
    padding: var(--content-padding);
    display: flex;
    flex-direction: column;
    justify-content: center;
    
    @media (max-width: 1199px) {
      height: auto;
      max-width: 600px;
      margin: 0 auto;
      padding: 0;
    }
    
    @media (min-width: 1200px) {
      height: 100%;
      order: var(--text-order);
      max-width: 600px;
      margin: 0 auto;
    }

    h2 {
      font-size: var(--title-font-size);
      color: rgb(var(--font-color));
      margin-bottom: 1rem !important;
    }
    
    p {
      margin: 0 !important;
    }

    .btn {
      margin-top: 1.5rem;
    }
  }
}

