.header { position: relative; height: 500px; display: flex; flex-direction: column; align-items: center; &__background { position: absolute; width: 100%; height: 100%; object-fit: cover; } &__text { width: 100%; padding: 0 90px; height: 100%; position: relative; z-index: 5; display: flex; flex-direction: column; justify-content: center; gap: 26px; color: white; h1 { max-width: 80%; text-wrap: balance; font-size: 52px; font-weight: 800; line-height: 62px; } p { font-size: 24px; font-weight: 300; line-height: 29px; } } } @media screen and (max-width: 1024px) { .header { &__text { padding: 0 30px; } } } @media screen and (max-width: 768px) { .header { &__text { gap: 22px; h1 { font-size: 40px; line-height: 48px; } p { font-size: 20px; line-height: 24px; } } } } @media screen and (max-width: 550px) { .header { height: 250px; &__text { padding: 0 16px; gap: 12px; h1 { font-size: 24px; line-height: 106%; } } } }