.section-page-timeline {
  background-color: rgb(var(--background-color));
  color: rgb(var(--font-color));
  overflow-x: hidden;

  .section-header {
    max-width: 600px;
    margin: 0 auto 3rem auto;
    height: auto;
    
    .block-page-cta {
      text-align: center;
    }
    
    h1, h2, h3, h4, h5, h6 {
      font-size: var(--section-title-font-size);
      padding: 0 !important;
      margin: 0 0 1rem 0;
      text-align: center;
      color: rgb(var(--font-color));
    }
    
    p {
      padding: 0 !important;
      margin: 0;
      text-align: center;
    }
  }

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

  .media-wrapper {
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    
    @media (max-width: 1199px) {
      aspect-ratio: 16 / 9;
      height: auto;
      padding: 0;
      position: relative;
    }
    
    @media (min-width: 1200px) {
      height: 100%;
      grid-column: var(--media-grid-column, 1);
      order: var(--media-order);
      padding: 3rem;
    }

    .block-page-media {
      width: 100%;
      height: 100%;
      max-width: 100%;
      max-height: 100%; 
      
      @media (max-width: 1199px) {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
      }
    }

    img,
    video {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center;
      border: 2px solid rgb(var(--color-foreground));
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
      
      @media (max-width: 1199px) {
        position: absolute;
        top: 0;
        left: 0;
      }
    }
  }

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

    h2 {
      font-size: var(--title-font-size);
    }
    
    p {
      margin: 0 !important;
    }

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

  .timeline-line {
    width: 100%;
    height: 100%;
    background-color: var(--timeline-color);
    display: block;
    position: relative;
    
    @media (max-width: 1199px) {
      grid-column: 1;
      grid-row: 1 / -1;
    }
    
    @media (min-width: 1200px) {
      grid-column: 2;
      grid-row: 1;
    }
  }

  .timeline-circle {
    position: absolute;
    display: block;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    transform-origin: center center;
    width: 2rem;
    height: 2rem;
    background-color: var(--timeline-color);
    border-radius: 50%;
    border: 1px solid rgba(var(--color-background));
    z-index: 2;
  }

  .timeline-circle-bottom {
    position: absolute;
    display: none;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%) translateY(50%);
    width: 2rem;
    height: 2rem;
    background-color: var(--timeline-color);
    border-radius: 50%;
    border: 1px solid rgba(var(--color-background));
    z-index: 2;
  }
  
  .block-page-timeline:last-child .timeline-circle-bottom {
    display: block;
  }

  .timeline-block {
    background-color: rgb(var(--block-background-color));
    color: rgb(var(--block-font-color));
    
    h2 {
      color: rgb(var(--block-font-color));
    }
  }
}