main section{
  padding: 6rem 20px;
}

main article {
  max-width: 820px;
  margin: auto;
}

main h1 {
  font-size: 3rem;
  font-weight: bold;
  font-family: 'Montserrat', sans-serif;
  line-height: 125%;
  margin-bottom: 3rem;
}

main h2 {
  font-size: 1.5rem;
  font-weight: bold;
  font-family: 'Montserrat', sans-serif;
  line-height: 125%;
  margin-bottom: 3rem;
}

main h3 {
  font-size: 1.5rem;
  font-weight: bold;
  font-family: 'Montserrat', sans-serif;
  line-height: 125%;
  margin-bottom: 1rem;
}

main h4 {
  font-size: 1.1rem;
  font-weight: bold;
  font-family: 'Montserrat', sans-serif;
  line-height: 125%;
  margin-bottom: 0.75rem;
}

main bdi{
  color: var(--primary-color);
}

main .secondary bdi {
  color: var(--secondary-color);
}

main ol {
  counter-reset: orderedlist;
  list-style: none;
}

main ol > li {
  position: relative;
  margin-bottom: 3rem;
  padding-left: 6rem;
}

main li:last-of-type{
  margin-bottom: 0;
}

main ol > li::before {
  position: absolute;
  left: 0;
  top: 0;
  counter-increment: orderedlist;
  content: counter(orderedlist);
  width: 4rem;
  height: 4rem;
  color: black;
  font-size: 1.5rem;
  font-weight: bold;
  font-family: 'Montserrat', sans-serif;
  border-radius: 50%;
  border: solid 4px black;
  display: flex;
  align-items: center;
  justify-content: center;
}

main ol.primary > li::before {
  color: var(--primary-color);
  border: solid 4px var(--primary-color);
}

main ol.secondary > li::before {
  color: var(--secondary-color);
  border: solid 4px var(--secondary-color);
}

main section.hero {
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.75) 50%, rgba(0, 0, 0, 0.75)), url(assets/fotowoltaika.jpg);
}

main section.hero article {
  max-width: 1240px;
}

main section.zalety-fotowoltaiki, main section.rola-magazynow {
  background-color: #FAFAFA;
}

main .flex {
  display: flex;
  flex-direction: row;
  gap: 3rem;
  align-items: center;
}

main .col1-2, main .col2-2 {
  flex: 1;
  width: 50%;
}

main section.rola-magazynow article {
  max-width: 1240px;
}

main .col1-3, main .col2-3, main .col3-3 {
  align-self: flex-start;
  flex: 1;
}

main section.rola-magazynow img.icon {
  display: block;
  height: 2.5rem;
  width: 2.5rem;
  margin: 0 auto 1.5rem auto;
}

main section.call-to-action {
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0.6)), url(assets/cta.jpg);
}

main section.call-to-action article {
  max-width: 1240px;
}

main section.call-to-action h2 {
  font-size: 2.5rem;
  color: white;
  margin: 0;
}

main section.out-reviews div.flex {
  gap: 3rem;
}

main section.our-reviews article {
  max-width: 1240px;
}

main section.our-reviews .review {
  align-self: flex-start;
}

main section.nasze-realizacje {
  padding-top: 1rem;
}

main section.nasze-realizacje article {
  max-width: 1240px;
}

main section.nasze-realizacje .gallery {
  display: flex;
}

main section.nasze-realizacje .gallery > img {
  width: 25%;
  height: auto;
  aspect-ratio: 1/1;
  object-fit: cover;
}

section.hero {
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.7) 50%, rgba(0, 0, 0, 0.1)), url(assets/hero.jpg);
  background-size: cover;
  background-position: center;
  padding: 6rem 0;
  color: white;
}

section.hero .hero-title {
  width: 60%;
  font-size: 4rem;
  color: white;
  margin-bottom: 2rem;
}

section.hero .hero-title span {
  color: var(--primary-color);
}

section.hero .hero-desc {
  width: 40%;
  margin-bottom: 4rem;
}

section.hero .contrast {
  color: var(--secondary-color);
}

section.hero .button-div {
  display: flex;
  gap: 2rem;
}

section.hero .first-hero-button, section.hero .second-hero-button {
  padding: 16px 26px;
  border: solid 3px white;
  transition: all 0.2s;
}

section.hero .first-hero-button {
  background-color: rgba(110, 217, 255, 0.5);
}

section.hero .first-hero-button:hover {
  background-color: rgba(110, 217, 255, 0.7);
}

.center {
  text-align: center;
}

section.hero .solar-panel {
  width: 40%;
  height: auto;
  position: absolute;
  right: 0;
  bottom: -200px;
}

section.hero .solar-panel:first-of-type {
  bottom: -125px;
  right: 75px;
}

section.services {
  margin-bottom: 3rem;
}

section.services .services-list {
  padding: 2rem 0;
  display: flex;
  width: 50%;
  justify-content: space-between;
}

section.services img.service-icon {
  width: 4rem;
}

section.services .service {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

section.services .service-name {
  text-align: center;
}

section.fotowoltaika {
  box-sizing: content-box;
  display: flex;
  gap: 5rem;
  max-width: 1240px;
  padding: 0 20px;
  margin: 0 auto;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6rem;
}

section.fotowoltaika .left {
  width: 50%;
}

section.fotowoltaika .right {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 50%;
}

.subtitle {
  color: var(--secondary-color);
}

section.fotowoltaika .title {
  margin-bottom: 1rem;
}

section.fotowoltaika .text {
  margin-bottom: 3rem;
}

section.fotowoltaika .benefits-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

section.fotowoltaika .benefit {
  display: flex;
  align-items: center;
  gap: 2rem;
}

section.fotowoltaika .benefit-icon {
  width: 40px;
  height: 40px;
}

section.fotowoltaika .image {
  width: 100%;
  position: relative;
  right: -20px;
}

section.fotowoltaika .buttons-div {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding-left: 40px;
}

a.main-button {
  padding: 19px 29px;
  color: black;
  background-color: var(--secondary-color);
  transition: all 0.2s;
  display: block;
}

a.secondary-button {
  padding: 16px 26px;
  border: solid 3px var(--primary-color);
  color: var(--primary-color);
  transition: all 0.2s;
  display: block;
}

section.our-team {
  max-width: 1280px;
  padding: 0 20px;
  margin: auto;
  display: flex;
  gap: 6rem;
  align-items: center;
  margin-bottom: 6rem;
}

section.our-team img.about-us-img{
  width: 40%;
  height: auto;
}

section.our-team .about-us-text {
  width: 60%;
}

section.our-team .subtitle {
  color: var(--secondary-color);
}

section.our-team .title {
  margin-bottom: 1rem;
}

section.our-team .text {
  margin-bottom: 2rem;
}

section.our-team .buttons-div {
  display: flex;
  gap: 2rem;
}

section.cta {
  padding-top: 6rem;
  padding-bottom: 6rem;
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('./assets/cta-bg.jpg');
  background-position: center;
  margin-bottom: 6rem;
}

section.cta .content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
}

section.cta .title {
  color: white;
}

section.cta .main-button {
  padding: 19px 48px;
}

section.work {
  max-width: 1280px;
  padding: 0 20px;
  margin: auto;
  margin-bottom: 6rem;
}

section.work .subtitle, section.work .title, section.work p {
  text-align: center;
}

section.work > p {
  max-width: 850px;
  margin: 0 auto 5rem auto;
}

section.work .title {
  margin-bottom: 1rem;
}

section.work .stages {
  display: flex;
  gap: 4rem;
}

section.work .stage {
  display: flex;
  flex-direction: column;
  align-items: center;
}

section.work .number-circle {
  width: 5rem;
  height: 5rem;
  background-color: rgba(110, 217, 255, 0.1);
  border: 4px solid var(--primary-color);
  border-radius: 50%;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 2rem;
}

section.work p.stage-title {
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-family: 'Montserrat', sans-serif;
  font-weight: bold;
}

section.reviews {
  margin-bottom: 6rem;
}

.reviews-box {
  display: flex;
  gap: 3rem;
}

.review {
  flex-shrink: 1;
  flex-grow: 1;
  flex-basis: 0;
}

.review > p {
  color: #6A6A6A;
  text-align: justify;
  margin-bottom: 0.8rem;
}

.review .author {
  font-weight: bold;
  color: var(--primary-color);
}

.star {
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0.5rem;
}

.reviews .title {
  margin-bottom: 4rem;
}

section.certificates {
  padding-bottom: 6rem;
}

section.certificates .cert-box {
  display: flex;
  gap: 2rem;
}

section.certificates .cert-box img {
  width: 100%;
  flex: 1;
}

section.certificates .title {
  margin-bottom: 3rem;
}

@media (max-width: 1080px) {
  .solar-panel {display: none}
  section.hero .hero-title, section.hero .hero-desc {
    width: 60%;
  }
  section.services .content > div{
    margin: auto;
    width: 100%;
    justify-content: space-evenly;
    flex-wrap: wrap;
    gap: 2rem;
  }
  section.fotowoltaika, section.cta .content, section.work .stages{
    flex-direction: column;
  }
  section.fotowoltaika .left, section.fotowoltaika .right {
    width: 100%;
  }
  section.fotowoltaika .right {
    max-width: 600px;
    margin-left: -20px;
  }
  section.our-team {
    flex-direction: column-reverse;
  }
  section.our-team .about-us-text {
    width: 100%;
  }
  section.our-team .about-us-img {
    display: none;
  }
  section.our-team .buttons-div {
    flex-wrap: wrap;
  }
}

@media (max-width: 769px) {
  section.hero .hero-title {
    font-size: 2.6rem;
  }
  section.hero .button-div {
    flex-direction: column;
  }
  section.hero .button-div a {
    display: inherit;
  }
  .reviews-box {
    flex-direction: column;
  }
  section.magazyny-energii .col2-2, section.nasze-klimatyzacje .col2-2 {
    max-width: 400px;
  }
  section.certificates .cert-box {
    flex-direction: column;
    align-items: center;
  }
  section.certificates .cert-box img {
    max-width: 500px;
  }
}

@media (max-width: 520px) {
  section.hero .hero-title, section.hero .hero-desc {
    width: 100%;
  }
}