/********** Template CSS **********/
:root {
    --primary: #32C36C;
    --light: #F6F7F8;
    --dark: #1A2A36;
}

.fw-medium {
    font-weight: 500 !important;
}

.fw-bold {
    font-weight: 700 !important;
}

.fw-black {
    font-weight: 900 !important;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
}

.img-fluid-sl {
    height: 600px;
}

/* Topbar container */
.topbar {
    background: #1c2b36;
    padding: 6px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: "Arial", sans-serif;
    font-size: 14px;
    color: #f5f5f5;
}

.topbar .topbar-item {
    display: inline-flex;
    align-items: center;
    margin-right: 18px;
    color: #ddd;
    transition: all 0.3s ease;
}

.topbar .topbar-item i {
    margin-right: 6px;
    font-size: 15px;
    color: #e63946;
}

.topbar .topbar-item:hover {
    color: #fff;
    transform: translateY(-1px);
}

.topbar .status-open {
    color: #06d6a0;
    font-weight: 500;
}

.topbar .status-closed {
    color: #e63946;
    font-weight: 500;
}

.topbar .social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    margin-left: 6px;
    border-radius: 50%;
    color: #e63946;
    border: 1px solid #e63946;
    font-size: 14px;
    transition: 0.3s;
}

.topbar .social-icons a:hover {
    background: #e63946;
    color: #fff;
}


/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}


/*** Button ***/
.btn {
    font-weight: 500;
    transition: .5s;
}

.btn.btn-primary,
.btn.btn-outline-primary:hover {
    color: #FFFFFF;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}

/*** Navbar ***/
.navbar.sticky-top {
    top: -100px;
    transition: .5s;
}

.navbar .navbar-brand,
.navbar a.btn {
    height: 75px;
}

.navbar .navbar-nav .nav-link {
    margin-right: 30px;
    padding: 25px 0;
    color: var(--dark);
    font-size: 15px;
    font-weight: 500;
    text-transform: uppercase;
    outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: red;
}

.nav-item.dropdown.megamenu>.dropdown-toggle::after {
    display: none !important;
}

.nav-item.dropdown.megamenu .dropdown-menu {
    display: block;
    opacity: 0;
    transform: translateY(-20px) !important;
    visibility: hidden;
    transition: all 0.3s ease;
}

.nav-item.dropdown.megamenu:hover .dropdown-menu,
.nav-item.dropdown.megamenu .dropdown-menu.show {
    opacity: 1;
    transform: translateY(0) !important;
    visibility: visible;
}


@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link {
        margin-right: 0;
        padding: 10px 0;
    }

    .navbar .navbar-nav {
        border-top: 1px solid #EEEEEE;
    }
}

@media (min-width: 992px) {
    .navbar .nav-item.megamenu .dropdown-menu {
        top: 100% !important;
        transform: translateY(-20px) !important;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .navbar .nav-item.megamenu:hover .dropdown-menu,
    .navbar .nav-item.megamenu .dropdown-menu.show {
        transform: translateY(0) !important;
        opacity: 1;
        visibility: visible;
    }
}

/*** Header ***/
.owl-carousel-inner {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, .1);
}

@media (max-width: 768px) {
    .header-carousel .owl-carousel-item {
        position: relative;
        min-height: 500px;
    }

    .header-carousel .owl-carousel-item img {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .header-carousel .owl-carousel-item p {
        font-size: 16px !important;
    }
}

.header-carousel .owl-dots {
    position: absolute;
    width: 60px;
    height: 100%;
    top: 0;
    right: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.header-carousel .owl-dots .owl-dot {
    position: relative;
    width: 45px;
    height: 45px;
    margin: 5px 0;
    background: #FFFFFF;
    box-shadow: 0 0 30px rgba(255, 255, 255, .9);
    border-radius: 45px;
    transition: .5s;
}

.header-carousel .owl-dots .owl-dot.active {
    width: 60px;
    height: 60px;
}

.header-carousel .owl-dots .owl-dot img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding: 2px;
    border-radius: 45px;
    transition: .5s;
}

.page-header {
    background: linear-gradient(rgba(0, 0, 0, .1), rgba(0, 0, 0, .1)), url(../img/carousel-1.jpg) center center no-repeat;
    background-size: cover;
}

.breadcrumb-item+.breadcrumb-item::before {
    color: var(--light);
}


/*** About ***/
@media (min-width: 992px) {
    .container.about {
        max-width: 100% !important;
    }

    .about-text {
        padding-right: calc(((100% - 960px) / 2) + .75rem);
    }
}

@media (min-width: 1200px) {
    .about-text {
        padding-right: calc(((100% - 1140px) / 2) + .75rem);
    }
}

@media (min-width: 1400px) {
    .about-text {
        padding-right: calc(((100% - 1320px) / 2) + .75rem);
    }
}


/*** Service ***/
.service-item {
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
}

.service-icon {
    position: relative;
    margin: -50px 0 25px 0;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: #FFFFFF;
    border-radius: 100px;
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
    transition: .5s;
}

.service-item:hover .service-icon {
    color: #FFFFFF;
    background: var(--primary);
}


/*** Feature ***/
@media (min-width: 992px) {
    .container.feature {
        max-width: 100% !important;
    }

    .feature-text {
        padding-left: calc(((100% - 960px) / 2) + .75rem);
    }
}

@media (min-width: 1200px) {
    .feature-text {
        padding-left: calc(((100% - 1140px) / 2) + .75rem);
    }
}

@media (min-width: 1400px) {
    .feature-text {
        padding-left: calc(((100% - 1320px) / 2) + .75rem);
    }
}


/*** Project Portfolio ***/
#portfolio-flters li {
    display: inline-block;
    font-weight: 500;
    color: var(--dark);
    cursor: pointer;
    transition: .5s;
    border-bottom: 2px solid transparent;
}

#portfolio-flters li:hover,
#portfolio-flters li.active {
    color: var(--primary);
    border-color: var(--primary);
}

.portfolio-img {
    position: relative;
}

.portfolio-img::before,
.portfolio-img::after {
    position: absolute;
    content: "";
    width: 0;
    height: 100%;
    top: 0;
    background: var(--dark);
    transition: .5s;
}

.portfolio-img::before {
    left: 50%;
}

.portfolio-img::after {
    right: 50%;
}

.portfolio-item:hover .portfolio-img::before {
    width: 51%;
    left: 0;
}

.portfolio-item:hover .portfolio-img::after {
    width: 51%;
    right: 0;
}

.portfolio-btn {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    z-index: 1;
    transition: .5s;
}

.portfolio-item:hover .portfolio-btn {
    opacity: 1;
    transition-delay: .3s;
}


/*** Quote ***/
@media (min-width: 992px) {
    .container.quote {
        max-width: 100% !important;
    }

    .quote-text {
        padding-right: calc(((100% - 960px) / 2) + .75rem);
    }
}

@media (min-width: 1200px) {
    .quote-text {
        padding-right: calc(((100% - 1140px) / 2) + .75rem);
    }
}

@media (min-width: 1400px) {
    .quote-text {
        padding-right: calc(((100% - 1320px) / 2) + .75rem);
    }
}


/*** Team ***/
.team-item {
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
}

.team-item img {
    border-radius: 8px 60px 0 0;
}

.team-item .team-social {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    background: #FFFFFF;
    transition: .5s;
}


/*** Testimonial ***/
.testimonial-carousel::before {
    position: absolute;
    content: "";
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
}

.testimonial-carousel::after {
    position: absolute;
    content: "";
    top: 0;
    right: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
}

@media (min-width: 768px) {

    .testimonial-carousel::before,
    .testimonial-carousel::after {
        width: 200px;
    }
}

@media (min-width: 992px) {

    .testimonial-carousel::before,
    .testimonial-carousel::after {
        width: 300px;
    }
}

.testimonial-carousel .owl-nav {
    position: absolute;
    width: 350px;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    opacity: 0;
    transition: .5s;
    z-index: 1;
}

.testimonial-carousel:hover .owl-nav {
    width: 300px;
    opacity: 1;
}

.testimonial-carousel .owl-nav .owl-prev,
.testimonial-carousel .owl-nav .owl-next {
    position: relative;
    color: var(--primary);
    font-size: 45px;
    transition: .5s;
}

.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial-carousel .owl-nav .owl-next:hover {
    color: var(--dark);
}

.testimonial-carousel .testimonial-img img {
    width: 100px;
    height: 100px;
}

.testimonial-carousel .testimonial-img .btn-square {
    position: absolute;
    bottom: -19px;
    left: 50%;
    transform: translateX(-50%);
}

.testimonial-carousel .owl-item .testimonial-text {
    margin-bottom: 30px;
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
    transform: scale(.8);
    transition: .5s;
}

.testimonial-carousel .owl-item.center .testimonial-text {
    transform: scale(1);
}


/*** Contact ***/
@media (min-width: 992px) {
    .container.contact {
        max-width: 100% !important;
    }

    .contact-text {
        padding-left: calc(((100% - 960px) / 2) + .75rem);
    }
}

@media (min-width: 1200px) {
    .contact-text {
        padding-left: calc(((100% - 1140px) / 2) + .75rem);
    }
}

@media (min-width: 1400px) {
    .contact-text {
        padding-left: calc(((100% - 1320px) / 2) + .75rem);
    }
}


/*** Footer ***/
.footer .btn.btn-social {
    margin-right: 5px;
    color: #9B9B9B;
    border: 1px solid #9B9B9B;
    border-radius: 38px;
    transition: .3s;
}

.footer .btn.btn-social:hover {
    color: var(--primary);
    border-color: var(--light);
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: #9B9B9B;
    font-weight: normal;
    text-transform: capitalize;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    color: #FFFFFF;
    letter-spacing: 1px;
    box-shadow: none;
}

.footer .copyright {
    padding: 25px 0;
    border-top: 1px solid rgba(256, 256, 256, .1);
}

.footer .copyright a {
    color: var(--light);
}

.footer .copyright a:hover {
    color: var(--primary);
}

/* Mega menu container */
.megamenu {
    position: static;
}

.megamenu .dropdown-menu {
    width: 100%;
    left: 0;
    right: 0;
    top: 100%;
    border-top: 3px solid #e63946;
    border-radius: 0;
}

.megamenu-content .col-md-4 h6 {
    font-weight: 600;
    margin-bottom: 10px;
}

.megamenu-content a.dropdown-item {
    padding: 4px 0;
    font-size: 15px;
}

.megamenu-content img {
    max-width: 100%;
    border-radius: 4px;
}

.megamenu .dropdown-menu {
    width: 100%;
    left: 0;
    right: 0;
    top: 100%;
    border-top: none;
    border-radius: 0;
}

.navbar .navbar-nav .nav-item.megamenu>.nav-link {
    position: relative;
}

.navbar .navbar-nav .nav-item.megamenu>.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 15px;
    width: 100%;
    height: 3px;
    background: #e63946;
}

.img-fluid {
    height: 300px;
}

.search-block {
    position: relative;
    width: 220px;
}

.search-input {
    width: 100%;
    padding: 8px 35px 8px 12px;
    border: 1px solid #ccc;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    cursor: pointer;
    font-size: 16px;
}

.search-icon:hover {
    color: #d32f2f;
}

/* Các đoạn responsive cũ của anh, được giữ nguyên */
@media (max-width: 576px) {
    .tree.horizontal-stable-v2 {
        transform: scale(0.55);
        transform-origin: top left;
    }
    .person img {
        width: 55px;
        height: 55px;
    }
    .person .name {
        font-size: 12px;
    }
    .person .title {
        font-size: 11px;
    }
    .award-cards {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    .award-card {
        width: 48%;
        margin-bottom: 10px;
    }
}

@media (max-width: 768px) {
    #portfolio-flters {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

@media (max-width: 768px) {
    .portfolio-container {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: stretch !important;
    }
    .portfolio-container .portfolio-item {
        position: static !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        -webkit-transform: none !important;
        width: 50% !important;
        max-width: 50% !important;
        flex: 0 0 50% !important;
        box-sizing: border-box !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        margin-bottom: 1rem !important;
    }
    .portfolio-container .portfolio-item .portfolio-img img {
        height: 180px;
        object-fit: cover;
        width: 100%;
        display: block;
    }
}

@media (max-width: 480px) {
    .portfolio-container .portfolio-item {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
}

@media (max-width: 768px) {
    .navbar-brand {
        margin-left: auto !important;
        margin-right: auto !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    h1 {
        z-index: 2;
    }
}

@media (max-width: 992px) {
    .about .col-lg-6,
    .feature .col-lg-6 {
        min-height: auto !important;
    }
    .about .position-relative,
    .feature .position-relative {
        position: relative !important;
        height: auto !important;
    }
    .about img.position-absolute,
    .feature img.position-absolute {
        position: relative !important;
        width: 100%;
        height: auto;
        object-fit: cover;
    }
}

@media (max-width: 576px) {
    .about .row.g-0,
    .feature .row.g-0 {
        flex-direction: column !important;
    }
    .about .col-lg-6,
    .feature .col-lg-6 {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        margin-bottom: 1rem;
    }
    .about .about-text,
    .feature .feature-text {
        padding: 1rem !important;
    }
    .about h1,
    .feature h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    .about p,
    .feature p {
        font-size: 0.9rem;
    }
    .feature .row.g-4 > .col-6 {
        width: 50%;
        max-width: 50%;
        margin-bottom: 0.5rem;
    }
    .feature .btn-lg-square {
        width: 40px;
        height: 40px;
        font-size: 0.8rem;
    }
    .feature h5 {
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    #portfolio-flters {
        display: none !important;
    }
    .portfolio-container .portfolio-item h5 {
        font-size: 0.9rem;
        line-height: 1.2;
    }
    .portfolio-container .portfolio-item p {
        font-size: 0.8rem;
    }
}


/* ======================================================= */
/* === BỔ SUNG GIAO DIỆN BÀI VIẾT & GIẢI PHÁP (CUỐI CÙNG) === */
/* ======================================================= */

/* --- 1. Giảm khoảng trắng giữa các section --- */
.benefit-section {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}
.home-news-section {
    padding-top: 2rem !important;
}

/* --- 2. Format lại layout Giải pháp nổi bật --- */
.benefit-item {
    background-color: #fff;
    border: 1px solid #f0f0f0;
    text-align: center;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    color: #000 !important;
}
.benefit-item p {
    color: #6c757d !important;
}
.benefit-item i {
    transition: transform 0.3s ease;
    margin-bottom: 0.75rem;
}
.benefit-item h5 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}
.benefit-item .benefit-description {
    font-size: 0.85rem;
    line-height: 1.5;
}
.benefit-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}
.benefit-item:hover i {
    transform: scale(1.1);
}
.benefit-item.benefit-01:hover { border-color: #28a745; }
.benefit-item.benefit-02:hover { border-color: #20c997; }
.benefit-item.benefit-03:hover { border-color: #ffc107; }
.benefit-item.benefit-04:hover { border-color: #dc3545; }
.benefit-item.benefit-05:hover { border-color: #0d6efd; }
.benefit-item.benefit-06:hover { border-color: #fd7e14; }


/* --- 3. Format lại layout Tin tức Trang chủ --- */
.home-news-section .news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.07);
    border: 1px solid #eee;
    border-radius: 4px; /* Ít bo tròn */
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.home-news-section .news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}
.home-news-section .news-card .news-thumb {
    overflow: hidden;
    position: relative;
}
.home-news-section .news-card .news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.home-news-section .news-card:hover .news-thumb img {
    transform: scale(1.08);
}
.home-news-section .card-body {
    padding: 0.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.home-news-section .news-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    color: #333;
    margin-bottom: 0.4rem; 
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.home-news-section .news-title a {
    color: inherit;
    text-decoration: none;
}
.home-news-section .news-title a:hover {
    color: var(--primary, #32C36C);
}
.home-news-section .post-date {
    font-size: 0.8rem;
    color: #888 !important;
    margin-top: auto;
}
.home-news-section .card-footer {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
}

/* --- Responsive cho Màn hình lớn (>= 992px) --- */
@media (min-width: 992px) {
    /* Nới rộng bài viết, thẳng hàng menu */
    .home-news-section.container-fluid {
        padding-left: 24px;
        padding-right: 24px;
    }
    .home-news-section .container {
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }
    .home-news-section .row {
        --bs-gutter-x: 1.2rem; /* Giảm khoảng trắng cột */
        --bs-gutter-y: 1.2rem; /* Giảm khoảng trắng hàng */
    }
    .home-news-section .news-card .news-thumb {
        aspect-ratio: 16 / 9; /* Ảnh chữ nhật */
    }
}

/* --- Responsive cho Tablet (768px -> 991px) --- */
@media (min-width: 768px) and (max-width: 991.98px) {
    .home-news-section .row {
        --bs-gutter-x: 1rem;
        --bs-gutter-y: 1rem;
    }
    .home-news-section .news-card .news-thumb {
        aspect-ratio: 4 / 3;
    }
}

/* --- Responsive cho Mobile (< 768px) --- */
@media (max-width: 768px) {
    /* Nới rộng bài viết, thẳng hàng menu */
    .home-news-section.container-fluid {
        padding-left: 16px;
        padding-right: 16px;
    }
    .home-news-section .container {
        padding-left: 0;
        padding-right: 0;
    }
    .home-news-section .row {
        --bs-gutter-x: 1rem;
        --bs-gutter-y: 1rem;
    }
    .home-news-section .news-card .news-thumb {
        aspect-ratio: 4 / 3;
    }
    .home-news-section .card-body { padding: 0.6rem; }
    .home-news-section .card-footer { padding: 0.4rem 0.6rem; }
    .home-news-section .news-title { font-size: 0.85rem; }
    .home-news-section .post-date { font-size: 0.7rem; }
}
:root {
    --bs-primary: #28a745; /* hoặc #00a859 nếu muốn xanh lá tươi hơn */
}

.text-primary {
    color: var(--bs-primary);
}
