/* static/css/styles.css */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    counter-reset: section figure equation table;
    padding-top: 56px;
}

.navbar-nav {
    flex-direction: row;
}

.nav-item {
    margin-left: 10px;
    margin-right: 10px;
}

/* Custom styles for the active navigation link */
.nav-link.active {
    font-weight: bold;
    background-color: #fbff00;   /* Change background color */
    border-radius: 5px;          /* Add border radius */
    padding: 10px;               /* Add padding for spacing */
}

/* Additional custom styling for inline list items */
.list-inline-item {
    border-left: 1px solid #ccc; /* Adds a separator */
    border-right: 1px solid #ccc; /* Adds a separator */
}

.list-inline-item:last-child {
    border-right: none; /* Removes the border from the last item */
}

.list-inline-item:first-child {
    border-left: none; /* Removes the border from the last item */
}

.container {
    width: 80%;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    margin: 0;
    font-size: 2.5em;
}

header p {
    margin: 5px 0;
}

article h2 {
    border-bottom: 2px solid #000;
    padding-bottom: 5px;
    counter-increment: section;
}

article h2::before {
    content: "Section " counter(section) ". ";
}

article h3 {
    margin-top: 20px;
    counter-increment: subsection;
}

article h3::before {
    content: counter(section) "." counter(subsection) " ";
}

table {
    width: 50%;
    border-collapse: collapse;
    margin-bottom: 20px;
    margin: 0 auto;
    counter-increment: table;
}

table, th, td {
    border: 1px solid #000;
    padding: 8px;
}



table caption::before {
    content: "Table " counter(table) ": ";
}


figure {
    margin: 20px 0;
    text-align: center;
    counter-increment: figure;
}

figcaption::before {
    content: "Figure " counter(figure) ": ";
}

figure img {
    width: auto;
    height: 30em;
}


figcaption {
    text-align: center;
    margin-top: 5px;
    font-style: italic;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #000;
}

.equation-id::before {
    content: "(equation " counter(equation) ")";
}

.equation-id {
    font-weight: bold;
    color: #333;
    margin-left: 5px;
}

.equation-block {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 20px 0;
    counter-increment: equation;
}

.container .figure {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-around;
    align-items: center;
   
}



@media print {

       
    body {
        font-size: 12pt;
    }

    header, footer {
        page-break-after: auto;
    }

    h2, h3 {
        page-break-after: avoid;
    }

    article {
        page-break-inside: auto;
    }

    table, figure {
        page-break-inside: avoid;
    }

    table {
        page-break-before: auto;
        page-break-after: auto;
    }

    tr {
        page-break-inside: avoid;
    }

    .equation-block {
        page-break-inside: avoid;
    }

    .no-print {
        display: none;
    }

    @page {
        margin: 100px 25px 100px 25px;
    }
       

 
}
