body {
    counter-reset: section; /* 默认计数器 */
}
.summary {
    color: #808080;
    border-left: 5px solid #ED1951;
    font-size:16px;
}


h3 {color: #ED1951; }
h4 {color: #808080; }

.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
    background-color: #248ec2;
    
    color: white;
}

.nav > li.active > a {
    background-color: #347DBE;
}

.nav > li > a:hover {
    background-color: #248ec2;
}


div.navbar-collapse .dropdown-menu {  /*change top nav chapter menu width*/

    position: absolute; 
    top: 100%; /* make sure the menu is below top nav bar */
    left:1rem;
    width: 90px; 
    min-width: 80px; 
    max-width: 90px;

}

div.navbar-collapse .dropdown-menu > li > a:hover {
    /* background-color: #347DBE; */
    background-color: #c7d6f3;
}

.nav li.thirdlevel > a {
    background-color: #FAFAFA !important;
    color: #248EC2;
    font-weight: bold;
}

a[data-toggle="tooltip"] {
    color: #649345;
    font-style: italic;
    cursor: default;
}

.navbar-inverse {
    /* background-color: #347DBE; */
    background-color: #1e4383;
    border-color: #1e4383;
}
.navbar-inverse .navbar-nav>li>a, .navbar-inverse .navbar-brand {
    color: white;
}

.navbar-inverse .navbar-nav>li>a:hover, a.fa.fa-home.fa-lg.navbar-brand:hover {
     color: #e3e9f4;
}

a.navbar-brand:hover {
  color: #e3e9f4;
}


.navbar-inverse .navbar-nav > .open > a, .navbar-inverse .navbar-nav > .open > a:hover, .navbar-inverse .navbar-nav > .open > a:focus {
    background-color: #3160ad; /*when Chpaters button was clicked*/
    color: #ffffff;
}

.navbar-inverse .navbar-collapse, .navbar-inverse .navbar-form {
    border-color: #248ec2 !important;
}

.btn-primary {
    color: #ffffff;
    background-color: #347DBE;
    border-color: #347DBE;
}

/* after the button is clicked, its styles are shown below */
.navbar-inverse .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a:hover, .navbar-inverse .navbar-nav > .active > a:focus {
    /* background-color: #347DBE; */
    background-color: #3160ad;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.open .dropdown-toggle.btn-primary {
    /* background-color: #248ec2;
    border-color: #347DBE; */
    background-color: #20a3d3;
    border-color: #20a3d3;
}

.printTitle {
    color: #015CAE !important;
}

body.print h1 {color: #015CAE !important; font-size:28px !important;}
body.print h2 {color: #595959 !important; font-size:20px !important;}
body.print h3 {color: #E50E51 !important; font-size:14px !important;}
body.print h4 {color: #679DCE !important; font-size:14px; font-style: italic !important;}

.anchorjs-link:hover {
    color: #216f9b;
}

div.sidebarTitle {
    color: #015CAE;
}

li.sidebarTitle {
    margin-top:20px;
    font-weight:normal;
    font-size:130%;
    color: #ED1951;
    margin-bottom:10px;
    margin-left: 5px;

}

.navbar-inverse .navbar-toggle:focus, .navbar-inverse .navbar-toggle:hover {
    background-color: #015CAE;
}

.navbar-inverse .navbar-toggle {
    border-color: #015CAE;
}
.chapter {
    counter-reset: section; /* 初始化计数器，确保每个章节从 1 开始 */
}

.subtitle-3 {
    counter-increment: section;
    color: #d32f2f; /* 红色标题 */
    font-weight: bold; /* 加粗文字 */
    font-size: 18px; /* 设置比默认稍大的文字大小 */
    margin-bottom: 10px;
}

.subtitle-3::before {
    content: attr(data-chapter) "." counter(section) " ";
    color: #50576b; /* 深蓝色的编号 */
    font-weight: bold; /* 加粗编号 */
    font-size: 18px; /* 确保编号的大小与标题文字一致 */
}

.subtitle-4{
    color:#015CAE;
    font-weight: bold;
}

.post-title-main{   /*edit the title for each page */
    color: #38446f;

}


u { 
    text-decoration: underline;
  }

.ul-circle ul li{ 
    list-style-type: circle;
    margin-left: 2rem;
    margin-top: 0.2rem;
    margin-bottom: 0.2rem;
    text-align: justify;
}
.ul-square ul li{ 
    list-style:square;
    margin-left: 2rem;
    margin-top: 0.3rem;
    margin-bottom: 0.3rem;
}

.italic-dark-blue{
    font-style: italic;
    color:#347DBE;
}

.italic-grey{
    font-style: italic;
    color: grey;
    text-align: center;
    padding: 0.4rem 0 0.8rem 0;
}

.equation{
    text-align: center;
}

.equation-container {
    display: flex; /* 使用flexbox将公式和标签放在同一行 */
    justify-content: space-between; /* 让两者分布在行的两边 */
    align-items: center;/* 使公式和标签垂直居中 */
    flex-wrap: wrap; 
    margin: 20px 0; /* 给容器添加一些上下间距 */
}

.formula {
    font-size: 1em;
    flex: 1; /* 让公式占据剩余的宽度 */
    text-align: center; /* 确保公式居中 */
}

.equation-label {
    background-color: #003366; /* 深蓝色背景 */
    color: white; /* 白色文字 */
    padding: 5px 15px; /* 给标签添加一些内边距 */
    font-size: 1.0em; /* 调整字体大小 */
    text-align: right; /* 让标签文字靠右对齐 */
    border-radius: 5px; /* 让标签的边角稍微圆滑 */
    white-space: nowrap; /* 防止标签换行 */
    margin-left: 20px; /* 给标签与公式之间留些空间 */
}

/* red square part */
#red-square ul {
    list-style-type: none; /* Removes default bullets */
    padding: 0; /* Removes default padding from the list */
    padding-left: 25px;
}
#red-square ul li {
    text-align: left;
    padding-left: 20px; /* Adds padding for custom bullet */
    text-indent: -20px; /* Aligns text properly with custom bullet */
    margin-bottom: 0.4rem; /* Ensures no extra space between items */
    margin-top: 0.4rem; /* Ensures no extra space between items */

}
#red-square ul li:before {
    content: "\25A0"; /* Unicode for square */
    color: #d32f2f; /* Color of the bullet */
    padding-right: 10px; /* Space between the bullet and text */
}
#red-square ul li ol{
    padding-left: 20px; /* Adds padding for custom bullet */
    text-indent: -20px; /* Aligns text properly with custom bullet */
}

/* Numbered list part */
#red-num ul {
    list-style-type: decimal; /* Changes the bullets to numbers */
    padding: 0; /* Removes default padding from the list */
    padding-left: 25px;
}

#red-num ul li {
    text-align: left;
    margin-bottom: 0.4rem; /* Ensures no extra space between items */
    margin-top: 0.4rem; /* Ensures no extra space between items */
}

/* Optional: To handle nested ordered lists (if you have sub-lists inside) */
#red-num ul li ol {
    padding-left: 20px; /* Adds padding for custom numbering in sublists */
}


/* Remove the external link icon for all links */
a[target="_blank"]::after {
    content: none; /* Removes the external link icon */
}


/* place items side by side */
.parent {
    
    display: flex;
    justify-content: space-between;

}

.child1 {
    font-weight: bold; /* Make the text bold */
    color: #015CAE; /* Use a similar blue color */
    flex: 0.8; /* 70% of the width */
    margin-right: 8px
     /* Optional margin between the two paragraphs */
}

.child2 {
    flex: 8; /* 30% of the width */
    padding-bottom: 10px;
}

.highlight {
    background-color: yellow; /* Change the background color to your preference */
    font-weight: bold; /* Optional: make it bold */
}