body {
    line-height: 1.7;
}

.page-loading {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-transition: all .4s .2s ease-in-out;
    transition: all .4s .2s ease-in-out;
    background-color: #fff;
    opacity: 0;
    visibility: hidden;
    z-index: 9999;
}

[data-bs-theme="dark"] .page-loading {
    background-color: #121519;
}

.page-loading.active {
    opacity: 1;
    visibility: visible;
}

.page-loading-inner {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    text-align: center;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    -webkit-transition: opacity .2s ease-in-out;
    transition: opacity .2s ease-in-out;
    opacity: 0;
}

.page-loading.active>.page-loading-inner {
    opacity: 1;
}

.page-loading-inner>span {
    display: block;
    font-family: "Inter", sans-serif;
    font-size: 1rem;
    font-weight: normal;
    color: #6f788b;
}

[data-bs-theme="dark"] .page-loading-inner>span {
    color: #fff;
    opacity: .6;
}

.page-spinner {
    display: inline-block;
    width: 2.75rem;
    height: 2.75rem;
    margin-bottom: .75rem;
    vertical-align: text-bottom;
    background-color: #d7dde2;
    border-radius: 50%;
    opacity: 0;
    -webkit-animation: spinner .75s linear infinite;
    animation: spinner .75s linear infinite;
}

[data-bs-theme="dark"] .page-spinner {
    background-color: rgba(255, 255, 255, .25);
}

@-webkit-keyframes spinner {
    0% {
        -webkit-transform: scale(0);
        transform: scale(0);
    }

    50% {
        opacity: 1;
        -webkit-transform: none;
        transform: none;
    }
}

@keyframes spinner {
    0% {
        -webkit-transform: scale(0);
        transform: scale(0);
    }

    50% {
        opacity: 1;
        -webkit-transform: none;
        transform: none;
    }
}

.navbar-brand img {
    width: 28px;
    margin-right: 8px;
}

span.form-check-input {
    border: none !important;
    margin-right: 24px !important;
}

span.form-check-input .wpcf7-list-item {
    margin-left: 0 !important;
}

.wpcf7-form .wpcf7-not-valid-tip {
    color: #ffeb3b;
    font-size: 13px;
}

/* Blog Grid Layout - Đảm bảo layout đều, không rớt hàng ngẫu nhiên */
.blog-grid-container {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

@media (min-width: 576px) {
    .blog-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .blog-grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

.blog-grid-item {
    display: flex;
    flex-direction: column;
}

.blog-grid-item .card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-grid-item .card-img-top {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.blog-grid-item .card-title {
    font-size: 1.15rem;
}

.blog-grid-item .card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-grid-item .card-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 4.5rem;
}

.blog-grid-item .card-footer {
    margin-top: auto;
}

.blog-grid-item .card-footer img {
    width: 24px;
}

.wp-caption {
    max-width: 100% !important;
}

.wp-caption img {
    max-width: 100% !important;
}


/* Tối ưu hệ thống tiêu đề từ H2 đến H6 */
.single-post .entry-content h2, 
.single-post .entry-content h3, 
.single-post .entry-content h4, 
.single-post .entry-content h5, 
.single-post .entry-content h6 {
    color: #000000;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 2.5rem;   /* Khoảng cách phía trên rộng để tách biệt các phần */
    margin-bottom: 1.25rem; /* Khoảng cách phía dưới vừa phải với đoạn văn */
    letter-spacing: -0.01em; /* Giảm khoảng cách chữ một chút cho hiện đại */
}

.single-post .entry-content {
    line-height: 1.8;
}

.single-post .entry-content strong {
    font-weight: 600;
}

/* Kích thước chữ phân cấp giảm dần */
.single-post .entry-content h2 { 
    font-size: 1.875rem; /* ~30px */
    /* border-bottom: 1px solid #eee; Thêm đường kẻ mờ cho H2 để phân đoạn lớn */
    padding-bottom: 0.5rem;
}

.single-post .entry-content h3 { 
    font-size: 1.5rem;   /* ~24px */
}

.single-post .entry-content h4 { 
    font-size: 1.25rem;  /* ~20px */
}

.single-post .entry-content h5 { 
    font-size: 1.125rem; /* ~18px */
    text-transform: uppercase; /* Viết hoa để phân biệt với H4 */
    letter-spacing: 0.05em;
}

.single-post .entry-content h6 { 
    font-size: 1rem;     /* ~16px */
    color: #555;         /* Màu nhạt hơn một chút cho tiêu đề nhỏ nhất */
    font-style: italic;
}

/* Điều chỉnh tiêu đề trên di động */
@media (max-width: 768px) {
    .single-post .entry-content h2 { font-size: 1.6rem; }
    .single-post .entry-content h3 { font-size: 1.35rem; }
    .single-post .entry-content h4 { font-size: 1.15rem; }
    .single-post .entry-content h5 { font-size: 1.05rem; }
    .single-post .entry-content h6 { font-size: 1rem; }
}

.display-2 {
    font-size: 2rem;
    font-weight: 600;
}