/* Custom CSS - Các chỉnh sửa CSS */

/* Fix màu hover của anchor text trong bài viết - từ trắng sang xanh dương */
.ht-format-detail a[href]:hover {
    color: #0a5aaa;
}

/* Thêm font-weight: bold cho các heading trong bài viết */
.ht-format-detail h1 {
    font-weight: bold;
}
.ht-format-detail h2 {
    font-weight: bold;
}
.ht-format-detail h3 {
    font-weight: bold;
}
.ht-format-detail h4 {
    font-weight: bold;
}
.ht-format-detail h5, .ht-format-detail h6 {
    font-weight: bold;
}

/* Mobile - Thêm font-weight: bold cho các heading */
@media screen and (max-width: 767px) {
    .ht-format-detail h1 {
        font-weight: bold;
    }
    .ht-format-detail h2 {
        font-weight: bold;
    }
    .ht-format-detail h3 {
        font-weight: bold;
    }
    .ht-format-detail h4 {
        font-weight: bold;
    }
}

/* Style cho mục lục - H3 sub-item */
.detail .leftDetail ul li.sub-item {
    padding-left: 20px;
    font-size: 0.9em;
}
.detail .leftDetail ul li.sub-item a {
    color: #666;
}
.detail .leftDetail ul li.sub-item a:hover {
    color: var(--primary-color);
}

/* Style cho Google Maps trong footer */
.footer-maps {
    margin-top: 112px;
}
.footer-maps .maps-container {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.footer-maps .maps-container iframe {
    width: 100%;
    height: 300px;
    border: 0;
    display: block;
}

/* Responsive cho Google Maps trong footer */
@media screen and (max-width: 767px) {
    .footer-maps {
        margin-top: 24px;
    }
    .footer-maps .maps-container iframe {
        height: 250px;
    }
}

/* Giảm khoảng trắng dư thừa cho các section trên trang home */
.ht-mrt192 {
    margin-top: 75px;
}

/* Responsive - Giảm margin-top cho tablet */
@media (max-width: 991px) {
    .ht-mrt192 {
        margin-top: 75px;
    }
}

/* Responsive - Giảm margin-top cho mobile */
@media (max-width: 767px) {
    .ht-mrt192 {
        margin-top: 75px;
    }
}

/* Footer - Điều chỉnh width của ft-info */
.footer .ft-info {
    width: 80%;
}

/* Header Sticky Scrolled Single Line Alignment */
@media (min-width: 992px) {
    .s-header-2.scrolled .s_bot .container {
        width: auto !important;
        max-width: 1040px !important;
    }
    .s-header-2 .hd-menu > ul {
        display: flex !important;
        align-items: center !important;
        white-space: nowrap !important;
    }
    .s-header-2 .hd-menu > ul > li {
        display: inline-flex !important;
        white-space: nowrap !important;
    }
    .s-header-2 .hd-menu > ul > li > a {
        white-space: nowrap !important;
        padding: 0 14px !important;
    }
    .s-header-2 .hd-contact {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }
    .s-header-2 .hd-contact span {
        white-space: nowrap !important;
    }
}

/* Style cho dropdown submenu trong header */
.s-header-2 .hd-menu > ul > li.has-submenu {
    position: relative;
}

.s-header-2 .hd-menu > ul > li.has-submenu > ul.submenu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffffff;
    min-width: 220px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 8px 0;
    margin-top: 8px;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
}

.s-header-2 .hd-menu > ul > li.has-submenu:hover > ul.submenu {
    visibility: visible;
    opacity: 1;
}

.s-header-2 .hd-menu > ul > li.has-submenu > ul.submenu::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #ffffff;
}

.s-header-2 .hd-menu > ul > li.has-submenu > ul.submenu > li {
    display: block;
    margin: 0;
    padding: 0;
}

.s-header-2 .hd-menu > ul > li.has-submenu > ul.submenu > li > a {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 0;
    line-height: 1.5;
}

.s-header-2 .hd-menu > ul > li.has-submenu > ul.submenu > li > a:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding-left: 24px;
}

.s-header-2 .hd-menu > ul > li.has-submenu > ul.submenu > li:first-child > a {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.s-header-2 .hd-menu > ul > li.has-submenu > ul.submenu > li:last-child > a {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Mobile - Submenu style */
@media screen and (max-width: 991px) {
    .s-header-2 .hd-menu > ul > li.has-submenu > ul.submenu {
        position: relative;
        top: 0;
        left: 0;
        transform: none;
        box-shadow: none;
        /* background-color: #f8f9fa; */
        margin-top: 0;
        margin-left: 20px;
        border-radius: 0;
        padding: 8px 0;
        visibility: visible;
        opacity: 1;
        /* max-height: 0; */
        overflow: hidden;
        transition: all 0.3s ease;
        list-style: none !important;
    }
    
    /* Ẩn submenu khi menu đóng */
    .s-header-2:not(.is-active) .hd-menu > ul > li.has-submenu > ul.submenu {
        visibility: hidden !important;
        opacity: 0 !important;
        max-height: 0 !important;
    }
    
    .s-header-2 .hd-menu > ul > li.has-submenu > ul.submenu::before {
        display: none;
    }
    
    .s-header-2 .hd-menu > ul > li.has-submenu > ul.submenu > li > a {
        padding: 8px 20px;
        font-size: 13px;
    }
}

/* ========================================= */
/*   GLOBAL FLOATING MESSENGER STYLES        */
/* ========================================= */
.floating-messenger-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    align-items: center;
    text-decoration: none;
    font-family: system-ui, -apple-system, sans-serif;
}

.messenger-tooltip {
    position: relative;
    margin-right: 12px;
    background: #ffffff;
    color: var(--primary-color, #007536);
    font-weight: 700;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 117, 54, 0.25);
    white-space: nowrap;
    border: 1px solid var(--primary-color, #007536);
    animation: messengerPulseBlink 1.8s infinite ease-in-out;
}

.messenger-tooltip::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-top: 1px solid var(--primary-color, #007536);
    border-right: 1px solid var(--primary-color, #007536);
    border-radius: 0 1px 0 0;
}

.floating-messenger-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.floating-messenger-container:hover .floating-messenger-btn {
    transform: scale(1.1);
}

.floating-messenger-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes messengerPulseBlink {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(0, 132, 255, 0.3);
        opacity: 1;
    }

    50% {
        transform: scale(1.06);
        box-shadow: 0 6px 22px rgba(0, 132, 255, 0.65);
        opacity: 0.85;
    }

    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(0, 132, 255, 0.3);
        opacity: 1;
    }
}

@media (max-width: 767px) {
    .floating-messenger-container {
        bottom: 20px;
        right: 15px;
    }

    .floating-messenger-btn {
        width: 50px;
        height: 50px;
    }

    .messenger-tooltip {
        font-size: 11px;
        padding: 6px 12px;
        margin-right: 8px;
    }
}


