Do not work on styles the same page when you create another?

Use Parcel and the preprocessor Pug. After creating a page different from the index.pug, for example, company.pug , I'm making a link to this page in a common file for all pages header.pug, after which the styles from the page index.pug fly, and in the company.pug is working properly. All styles and scripts are connected to main.js. What could be the problem?

index.pug
<!DOCTYPE html>
html(lang="en")
head
meta(charset="UTF-8")
 meta(name="viewport" content="width=device-width, initial-scale=1.0")
 meta(http-equiv="X-UA-Compatible", content="ie=edge")
 title Main page | SK "Gas"
body.page
 include includes/header
main.main
 include includes/sectionOne
 include includes/sectionTwo
 include includes/sectionThree
 include includes/sectionFour
 include includes/sectionFive
 include includes/footer
 include includes/modules/ModalCallBack
 script(src='assets/js/main.js')


company.pug
<!DOCTYPE html>
html(lang="en")
head
meta(charset="UTF-8")
 meta(name="viewport" content="width=device-width, initial-scale=1.0")
 meta(http-equiv="X-UA-Compatible", content="ie=edge")
 title On the company
body.page.page-company.page-other
 include /../includes/header
main.main
 include /../includes/footer
 script(src='/assets/js/main.js')


header.pug
.header-menu.menu--desktop.col-6l.col-12s.flex
nav.nav
 a(href="/pages/company.pug").nav-link About the company
 a(href="").nav-link Services
 a(href="").nav-link Promotions and news
 a(href="").nav-link Contacts


Project structure:
54ea961f20ca223ac3a6911fe0eae7b9.png
April 3rd 20 at 17:29
1 answer
April 3rd 20 at 17:31
The essence of the Pug including and getting rid of code duplication.
I'm using a template that connected to the pages. The data in the template change according to variables on the page.

the pieces of my starting template, for example
main.pug
include ../utils/mixins
block variables

doctype html
html(lang="ru-ru")
head
meta(charset="utf-8")
 title #{title}
 <!--[if IE]>
 meta(http-equiv='X-UA-Compatible', content="IE = edge")
<![endif]-->
 meta(name="viewport" content="width=device-width,initial-scale=1")
 meta(name="keywords" content="")
 link(rel="stylesheet" type='text/css' href="css/styles.min.css")
 include ../modules/header/favicon
 include ../modules/header/og
 <!--[if lt IE 9]>
script(src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js")
<![endif]-->
body
.wrapper
 include ../modules/header/header
.content
 block content
 include ../modules/footer/footer
script(src="js/jquery-3.3.1.min.js")
script(src="js/libs.min.js")
script(src="js/main.js")
 block script


index.pug
extends template/main

block variables
 - var title = 'Home'

block content

Find more questions by tags CSSJavaScriptHTMLPug