section {
  /* padding-inline: var(--inline-padding); */
  padding-block: 60px;

  &:first-of-type {
    margin-top: var(--header-height);
    padding-top: 60px;

    .breadcrumbs {
      color: #757c8a;

      & b {
        color: inherit;
        font-weight: 400;
      }
    }
  }

  &:last-of-type {
    padding-bottom: 150px;
  }

  @media (max-width: 1460px) {
    &:first-of-type {
      padding-top: 40px;
    }
  }

  @media (max-width: 1200px) {
    padding-block: 40px;
    &:first-of-type {
      padding-top: 30px;
    }
  }

  @media (max-width: 800px) {
    &:first-of-type {
      padding-top: 20px;
    }
  }
}

section .wrap#hero {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 7fr 6fr;
  align-items: stretch;
  gap: 70px;

  & .flexibility-img {
    border-radius: 10px;
    overflow: hidden;
    height: 100%;
    width: 100%;
    translate: 0 5px;
    opacity: 0;
    animation:
      fadeIn var(--duration-200) ease-out forwards,
      returnTranslate var(--duration-200) ease-out forwards;
    animation-delay: 50ms;

    & img {
      height: 100%;
      width: 100%;
      object-fit: cover;
      object-position: 70% 50%;
      scale: 1.25;
      rotate: 0.1deg; /* FF bug fix */
    }
  }

  & h1,
  & p {
    translate: 0 5px;
    opacity: 0;
    animation:
      fadeIn var(--duration-200) ease-out forwards,
      returnTranslate var(--duration-200) ease-out forwards;
  }

  & h1 {
    margin-block: 30px 50px;
    animation-delay: 100ms;
  }

  & p {
    margin-bottom: 30px;
    animation-delay: 150ms;
  }

  @media (max-width: 1460px) {
    grid-template-columns: 1fr 1fr;

    & .flexibility-img img {
      scale: 1;
    }
  }

  @media (max-width: 1200px) {
    gap: 20px;
    grid-template-columns: 1fr;

    & .flexibility-img {
      order: 2;
      object-fit: cover;
      animation-delay: 175ms;

      & img {
        translate: -10% 0;
        scale: 1.25;
      }
    }

    & div h1 {
      margin-block: 20px 30px;
    }
  }

  @media (max-width: 800px) {
    gap: 10px;

    & .flexibility-img {
      & img {
        scale: 1.5;
      }
    }

    & div {
      h1 {
        margin-block: 0px 20px;
      }

      p {
        margin-bottom: 20px;
      }
    }
  }
}

section .wrap {
  & h1 {
    margin-bottom: 50px;
  }

  & img.floor-sections {
    margin: auto;
  }

  & p {
    & b {
      font-weight: 500;
    }
  }

  & .grid.sections {
    padding-block: 60px 120px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;

    & .card {
      position: relative;
      padding: 40px 30px 70px;
      background-color: var(--color-secondary);
      border-radius: 10px;

      & img {
        width: 100%;
      }

      & .badge {
        position: absolute;
        bottom: 0;
        left: 50%;
        translate: -50% 50%;
        width: 85px;
        height: 85px;
        background-color: #c1c7d3;
        color: var(--color-secondary);
        padding: 10px 20px;
        border-radius: 100px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 40px;

        & b {
          color: inherit;
          font-weight: 600;
        }
      }

      & .label {
        position: absolute;
        bottom: -90px;
        left: 50%;
        translate: -50% 50%;
        border-radius: 100px;
        padding: 6px 24px;
        min-width: 200px;
        text-align: center;
        font-size: var(--font-size-text);
        font-weight: 600;
        color: var(--color-secondary);
        background-color: #c1c7d3;

        /* bottom: -17.5%;
        color: hsl(220, 17%, 65%);
        background-color: transparent; */
      }
    }
  }

  @media (max-width: 1200px) {
    & h1 {
      margin-bottom: 30px;
    }

    & .grid.sections {
      padding-block: 40px 90px;

      & .card {
        padding: 30px 20px 50px;

        & .badge {
          width: 50px;
          height: 50px;
          font-size: 24px;
        }

        & .label {
          bottom: -60px;
          min-width: 170px;
        }
      }
    }
  }

  @media (max-width: 800px) {
    & h1 {
      margin-bottom: 20px;
    }

    & .grid.sections {
      grid-template-columns: 1fr;
      gap: 140px;

      & .card {
        padding: 30px 20px 70px;

        & .badge {
          width: 80px;
          height: 80px;
          font-size: 32px;
        }

        & .label {
          bottom: -75px;
          min-width: 150px;
        }
      }
    }
  }

  @media (max-width: 600px) {
    & .grid.sections {
      & .card {
        padding-bottom: 60px;

        & .badge {
          width: 60px;
          height: 60px;
          font-size: 24px;
        }

        & .label {
          bottom: -60px;
        }
      }
    }
  }

  @media (max-width: 420px) {
    & .grid.sections {
      gap: 100px;

      & .card {
        padding: 20px 10px 50px;

        & .badge {
          width: 46px;
          height: 46px;
          font-size: 20px;
        }

        & .label {
          bottom: -50px;
        }
      }
    }
  }
}

section#flexi-sections .wrap {
  & h1,
  & img {
    translate: 0 5px;
    opacity: 0;
    animation:
      fadeIn var(--duration-200) ease-out forwards,
      returnTranslate var(--duration-200) ease-out forwards;

    &:nth-child(1) {
      animation-delay: 175ms;
    }

    &:nth-child(2) {
      animation-delay: 200ms;
    }
  }
}

section#flexi-explanation .wrap {
  & > h1,
  & > p,
  & > .grid.sections {
    translate: 0 5px;
    opacity: 0;
    animation:
      fadeIn var(--duration-200) ease-out forwards,
      returnTranslate var(--duration-200) ease-out forwards;
  }

  & > h1 {
    animation-delay: 100ms;
  }

  & > p {
    animation-delay: 125ms;
  }

  & > .grid.sections {
    animation-delay: 150ms;
  }
}

section#flexi {
  padding-top: 120px;

  .wrap {
    display: grid;
    grid-template-columns: 3fr 2fr;
    align-items: stretch;
    gap: 70px;

    & > div > h1,
    & > div > p,
    & > div > .btns,
    & > img {
      translate: 0 5px;
      opacity: 0;
      animation:
        fadeIn var(--duration-200) ease-out forwards,
        returnTranslate var(--duration-200) ease-out forwards;
    }

    & > div > h1 {
      animation-delay: 100ms;
    }

    & > div > p {
      animation-delay: 150ms;
    }

    & > div > .btns {
      animation-delay: 200ms;
    }

    & > img {
      animation-delay: 150ms;
    }

    & .btns {
      padding-block: 40px 30px;
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 28px 20px;

      & .button {
        height: 40px;
        font-size: 18px;
        text-decoration: none;
        text-align: center;
      }
    }

    & img {
      object-fit: cover;
      object-position: center;
      border-radius: 10px;
    }
  }

  @media (max-width: 1460px) {
    padding-top: 80px;

    .wrap {
      grid-template-columns: 1fr 1fr;
    }
  }

  @media (max-width: 1000px) {
    padding-top: 0;

    .wrap {
      grid-template-columns: 1fr;
      padding-inline: 0;

      & > div {
        order: 2;
        padding-inline: var(--inline-padding);

        & .btns {
          padding-block: 30px 0;
          max-width: 400px;
          gap: 10px;

          & .button {
            height: unset;
            padding: 6px 14px;
            font-size: 16px;
          }
        }
      }

      & img {
        border-radius: 0;
        animation-delay: 50ms;
      }
    }
  }
}

.apt-info {
  & .layout {
    height: 70px;
    font-size: 30px;
    font-weight: 600;
    padding-inline: 10px;
    background-color: #c1c7d2;
    border-radius: 10px;
    display: grid;
    place-items: center;
    text-align: center;
  }

  & .module-type {
    margin-top: 20px;
    height: 110px;
    display: grid;
    place-items: center;
    text-align: center;
    padding-inline: 10px;
    border-radius: 10px 10px 0 0;
    font-weight: 600;
    line-height: 1.2;
    background-color: #eef1f4;
  }

  & .features {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    padding: 30px 20px 40px;
    font-size: 16px;
    border: 2px solid #eef1f4;
    border-top: none;
    border-radius: 0 0 10px 10px;

    & p {
      text-wrap: balance;
    }

    & .badge {
      position: absolute;
      bottom: 0;
      left: 50%;
      translate: -50% 50%;
      background-color: var(--color-primary);
      color: var(--color-secondary);
      width: 38px;
      height: 38px;
      border-radius: 100px;
      font-size: 18px;
      font-weight: 600;
      display: grid;
      place-items: center;
    }
  }
}

section.apartment-section h1 {
  margin-bottom: 70px;
  font-weight: 300;

  & b {
    font-weight: 600;
  }
}

section#byt-1kk {
  padding-bottom: 140px;

  & .flex {
    display: flex;
    gap: 80px;

    & img {
      max-width: 350px;
    }

    & .apt-info {
      margin-top: 30px;
      width: 230px;

      & .features {
        padding-bottom: 30px;
      }
    }
  }

  @media (max-width: 1200px) {
    padding-bottom: 80px;
    & h1 {
      margin-bottom: 50px;
    }
  }

  @media (max-width: 800px) {
    & .flex {
      gap: 20px;
      justify-content: space-between;
    }
  }

  @media (max-width: 700px) {
    & .flex {
      flex-direction: column;
      align-items: center;
      gap: 40px;

      & img {
        order: 2;
      }

      & .apt-info {
        & .layout,
        & .module-type {
          height: 60px;
        }

        & .features {
          padding-block: 20px;
        }
      }
    }
  }
}

section#byt-2kk,
section#byt-3kk {
  & h1 {
    margin-bottom: 100px;
  }

  & .grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;

    & .version {
      display: flex;
      flex-direction: column;
      align-items: stretch;

      & img {
        margin-bottom: 40px;
      }

      & .apt-info {
        padding-right: 8%;
        display: flex;
        flex-direction: column;
        height: 100%;

        & .features {
          flex-grow: 1;
        }
      }
    }
  }
}

section#byt-2kk {
  @media (max-width: 1400px) {
    & .grid {
      gap: 120px;
      grid-template-columns: repeat(2, 1fr);

      & .version {
        display: grid;
        grid-template-columns: 2fr 2fr;
        gap: 20px;

        & .apt-info {
          padding-right: 0;
          padding-bottom: 0;
          height: max-content;

          & .layout {
            font-size: 24px;
          }

          & .module-type {
            height: 80px;
          }
        }
      }
    }
  }

  @media (max-width: 1200px) {
    & h1 {
      margin-bottom: 60px;
    }

    & .grid {
      grid-template-columns: 1fr;

      & .version {
        & .apt-info {
          & .layout {
            font-size: 30px;
          }
        }
      }
    }
  }

  @media (max-width: 700px) {
    & .grid {
      grid-template-columns: 1fr;
      place-items: center;
      gap: 120px;

      & .version {
        grid-template-columns: 1fr;
        gap: 70px;

        & img {
          order: 2;
          max-width: 350px;
        }

        & .apt-info {
          width: 100%;
          max-width: 350px;
          padding-right: 0;

          & .layout,
          & .module-type {
            height: 60px;
          }

          & .features {
            padding-top: 20px;
          }
        }
      }
    }
  }
}

section#byt-3kk {
  & .grid {
    grid-template-columns: repeat(3, 1fr);

    & .version {
      & .apt-info {
        padding-right: 0;
      }
    }
  }

  @media (max-width: 1350px) {
    & .grid {
      grid-template-columns: 1fr;
      gap: 100px;

      & .version {
        display: grid;
        grid-template-columns: 4fr 2fr;
        gap: 50px;

        & .apt-info {
          padding-right: 0;
          padding-bottom: 0;
          height: max-content;

          & .layout {
            font-size: 24px;
          }

          & .module-type {
            height: 80px;
          }
        }
      }
    }
  }

  @media (max-width: 1200px) {
    & .grid {
      & .version {
        grid-template-columns: 3fr 2fr;
      }
    }
  }

  @media (max-width: 700px) {
    & h1 {
      margin-bottom: 60px;
    }
    & .grid {
      grid-template-columns: 1fr;
      place-items: center;
      gap: 120px;

      & .version {
        width: 100%;
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 70px;

        & img {
          max-width: 100%;
          order: 2;
        }

        & .apt-info {
          width: 100%;
          max-width: 350px;
          padding-right: 0;

          & .layout,
          & .module-type {
            height: 60px;
          }

          & .features {
            padding-top: 20px;
          }
        }
      }
    }
  }
}

section#byt-4kk {
  & .grid {
    display: grid;
    grid-template-columns: auto 230px;
    gap: 50px;

    & .apt-info {
      width: 100%;

      & .features {
        padding-bottom: 30px;
      }
    }
  }

  @media (max-width: 1200px) {
    & .grid {
      grid-template-columns: 1fr;
      justify-items: center;
      gap: 80px;

      & .apt-info {
        max-width: 400px;

        & .module-type {
          height: 80px;
        }
      }
    }
  }

  @media (max-width: 700px) {
    & .grid {
      gap: 60px;

      & img {
        order: 2;
      }

      & .apt-info {
        width: 100%;
        max-width: 350px;

        & .layout,
        & .module-type {
          height: 60px;
        }

        & .features {
          padding-block: 20px;
        }
      }
    }
  }
}
