.section-onas {
  width: 100vw;
  margin-top: 2%;
  overflow: hidden;
}

.onas-content {
  display: flex;
  flex-wrap: nowrap; /* domyślnie wiersz */
  align-items: stretch; /* wyrównujemy wysokość */
  justify-content: center;
  gap: 0px;
  padding: 0;
  margin-bottom: 100px;
}

/* zdjęcie */
.onas-image {
  flex: 1 1 45%;
  max-width: 700px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  max-height: 100%;
  overflow: hidden;
}
.onas-image img {
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: cover;
  border-radius: 10%;
  display: block;
}

/* tekst */
.onas-text {
  flex: 1 1 100%;
  margin-left: 5%;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  max-height: 100%;
}

/* nagłówki i tekst */
.onas-text h1 {
  font-size: clamp(20px, 4vw, 30px);
  margin-bottom: 0;
}
.onas-text h5 {
  font-size: clamp(14px, 2.5vw, 20px);
  font-weight: 350;
  line-height: 1.5;
  color: #333;
  margin-bottom: 0;
}
.onas-text h2 {
  font-size: clamp(20px, 4vw, 30px);
  margin-bottom: 0;
}

/* RESPONSYWNOŚĆ - do 750px kolumna z obrazkiem na górze */
@media screen and (max-width: 750px) {
  .onas-content {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 0 10px;
  }

  /* zdjęcie jako pierwsze */
  .onas-image {
    order: 0;
    flex: unset;
    max-width: 90vw;
    width: 90vw;
    max-height: 300px; /* mniejsza wysokość niż wcześniej */
  }

  .onas-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
  }

  .onas-text {
    order: 1;
    flex: unset;
    max-width: 90vw;
    width: 90vw;
    margin-left: 0;
    text-align: center;
  }

  .onas-text h1 {
    font-size: clamp(18px, 6vw, 26px);
  }
  .onas-text h2 {
    font-size: clamp(18px, 5vw, 24px);
  }
  .onas-text h5 {
    font-size: clamp(14px, 4vw, 18px);
    line-height: 1.6;
  }
}

/* powyżej 750px - rząd i wyrównanie wysokości */
@media screen and (min-width: 751px) and (max-width: 1024px) {
  .onas-content {
    flex-direction: row;
    align-items: flex-start; /* zamiast stretch, żeby nie rozciągać nadmiernie */
    justify-content: center;
    gap: 40px;
    padding: 0 3%;
  }

  .onas-image {
    flex: 0 0 40%; /* trochę mniej niż 45% */
    max-width: 40vw;
    max-height: 300px; /* ograniczamy wysokość zdjęcia */
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .onas-image img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
    border-radius: 10%;
  }

  .onas-text {
    flex: 1 1 55%;
    max-width: 55vw;
    margin-left: 0;
  }

  .onas-text h1 {
    font-size: 24px;
    margin-bottom: -8px;
  }

  .onas-text h2 {
    font-size: 22px;
    margin-bottom: -8px;
  }

  .onas-text h5 {
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 0px;
  }
}

/* Dla większych ekranów - desktop powyżej 1024px do 1440px */
@media screen and (min-width: 1025px) and (max-width: 1240px) {
  .onas-content {
    flex-direction: row;
    align-items: stretch; /* wyrównanie wysokości */
    justify-content: center;
    padding: 0 5%;
  }

  .onas-image {
    flex: 0 0 45%;
    max-width: 45vw;
    max-height: 350px; /* trochę wyżej niż w średnich ekranach */
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .onas-image img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
    border-radius: 10%;
  }

  .onas-text {
    flex: 1 1 50%;
    max-width: 50vw;
    margin-left: 5%;
  }

  .onas-text h1 {
    font-size: 26px;
  }

  .onas-text h2 {
    font-size: 24px;
  }

  .onas-text h5 {
    font-size: 18px;
    line-height: 1.6;
  }
}

/* Powyżej 1440px - większe ekrany desktopowe */
@media screen and (min-width: 1441px) {
  .onas-content {
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    padding: 0 8%;
  }

  .onas-image {
    flex: 0 0 45%;
    max-width: 500px;
    max-height: 540px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .onas-image img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
    border-radius: 10%;
  }

  .onas-text {
    flex: 1 1 45%;
    max-width: 800px;
  }

  .onas-text h1 {
    font-size: 30px;
  }

  .onas-text h2 {
    font-size: 30px;
  }

  .onas-text h5 {
    font-size: 16px;
    line-height: 1.5;
  }
}
@media screen and (min-width: 751px) and (max-width: 1024px) {
  .onas-image {
    max-height: 380px; /* trochę większe niż wcześniej */
  }
}

/* Sekcja rzędowa na laptopach i mniejszych desktopach */
@media screen and (min-width: 1025px) and (max-width: 1440px) {
  .onas-image {
    max-height: 450px; /* większe zdjęcie */
  }
  .onas-image img {
    max-height: 100%;
    width: auto;
  }

  /* Dodatkowo nieco mniejsze marginesy między tekstami */
  .onas-text h1,
  .onas-text h2,
  .onas-text h5 {
    margin-top: 10px;
    margin-bottom: 10px;
  }
}
