/*
Theme Name: hbk
Author: Max Do
Version: 1.0.0
Description: Theme độc lập cho dự án METRYX và thiết bị công nghiệp.
*/

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a{
    text-decoration: none;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #111827;
    background-color: #f9fafb;
}
.container-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0;
}
.container-main-nav {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0;

    /* Thêm các dòng dưới đây */
    display: flex;            /* Kích hoạt flexbox để các phần tử con thành inline */
    justify-content: flex-end; /* Dồn toàn bộ phần tử con về phía bên phải */
    align-items: center;      /* Căn giữa các phần tử theo chiều dọc cho thẳng hàng */
    gap: 20px;                /* Tạo khoảng cách giữa các phần tử (tùy chỉnh theo ý bạn) */
}

/* Header Styles */
.header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #F1F8FE;
    margin-top: 0;
}

/* Top Header */
.header-top {

}

.header-top-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 64px;
}

.logo-container {
    flex-shrink: 0;
    margin-top: 35px;
}

.custom-logo-link img {
    max-width: 250px;
    max-height: 66px;
}

/* Search */
.search-container {
    flex: 1;
    max-width: 448px;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.search-input {
    width: 94%;
    padding: 8px 16px 8px 40px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: #f9fafb;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
    float:right;
}

.search-input:focus {
    border-color: #1e40af;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.contact-link:hover {
    color: #1e40af;
}

.contact-link svg {
    flex-shrink: 0;
    color:#0568f6;
}

/* Language Selector */
.language-selector {
    position: relative;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.language-btn:hover {
    border-color: #1e40af;
}

.flag-icon {
    flex-shrink: 0;
}

.language-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 160px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    padding: 4px 0;
    display: none;
    z-index: 100;
}

.language-dropdown.show {
    display: block;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px 16px;
    border: none;
    background: none;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    color: #374151;
    transition: background-color 0.3s;
}

.lang-option:hover {
    background-color: #f9fafb;
}

.lang-option.active {
    background-color: #f9fafb;
    font-weight: 500;
    color: #1e40af;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    padding: 8px;
    border: none;
    background: none;
    cursor: pointer;
    color: #374151;
}

.mobile-menu-btn:hover {
    background-color: #f9fafb;
    border-radius: 8px;
}

.hidden {
    display: none;
}

/* Bottom Header - Navigation */
.header-nav {
    position: relative;
}

.nav-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 24px;
}

.menu-item a {
    display: inline-block;
    align-items: center;
    gap: 4px;
    color: black;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 20px 0;
    transition: color 0.3s;
}

.menu-item.current-menu-item a{
    color:#0144F6
}

.menu-item a:hover,
.menu-item a.active {
    color: #0568f6;
}

.menu-item {
    position: relative;
    list-style:none;
}

/* Social Icons */
.social-icons {
    display: flex;
    align-items: center;
    gap: 16px;
}

.social-link {
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.3s;
}

.social-link:hover {
    color: white;
}

/* Mega Menu */
/* Đảm bảo menu cha có vị trí tương đối để làm mốc cho menu con */
.main-nav {
    width:100%;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-item-has-children {
    position: static;
}

.sub-menu {
    display: none;
    position: absolute;
    width: max-content;
    max-width: 95vw;
    left: 50%;
    transform: translateX(-50%);

    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    z-index: 999;
    padding: 30px 20px;
    border-top: 2px solid #002060;
    box-sizing: border-box;
}

.menu-item:hover > .sub-menu {
    display: flex;
    justify-content: flex-start;
    gap: 30px;
    flex-wrap: nowrap;
}
.sub-menu > .menu-item {
    width: 220px;
    padding: 0;
    list-style: none;
}

.sub-menu > .menu-item > a {
    font-weight: bold;
    color: #002060;
    text-transform: uppercase;
    font-size: 14px;
    display: block;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.sub-menu .sub-menu {
    position: relative;
    display: block !important;
    box-shadow: none;
    padding: 0;
    border: none;
    width: 100%;
}

.sub-menu .sub-menu .menu-item {
    width: 100%;
    padding: 0;
}

.sub-menu .sub-menu .menu-item a {
    font-weight: normal;
    text-transform: none;
    color: #555;
    font-size: 13px;
    padding: 5px 0;
    border: none;
    display: block;
    line-height: 1.4;
    white-space: normal;
}

.sub-menu .sub-menu .menu-item a:hover {
    color: #1e5fa8;
    padding-left: 5px;
    transition: all 0.3s;
}

.nav-list > .menu-item-has-children > a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-right: 5px;
}

.nav-list > .menu-item-has-children > a::after {
    content: "";
    width: 0;
    height: 0;
    display: inline-block;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform 0.3s ease;
    margin-top: 2px;
}

.nav-list > .menu-item:hover > a::after {
    transform: rotate(180deg);
}

.nav-list .sub-menu .menu-item-has-children > a::after {
    display: none !important;
}

.nav-list > .current-menu-item > a::after,
.nav-list > .current-menu-ancestor > a::after {
    border-top-color: inherit;
}

/* Main Content */
#main-content {
    padding-top: 60px;
    background:#F1F8FE
}

/* Page Styles */
.page-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.breadcrumb {
    margin-bottom: 24px;
    font-size: 14px;
    color: #6b7280;
}

.breadcrumb a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: #1e40af;
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 48px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    background: white;
    padding: 32px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin: 32px 0;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 40px;
    font-weight: bold;
    color: #1e40af;
    margin-bottom: 8px;
}

.stat-label {
    color: #6b7280;
    font-size: 14px;
}

/* Gradient Cards */
.gradient-card {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: white;
    padding: 32px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.gradient-card h2 {
    font-size: 24px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.gradient-card-icon {
    background: rgba(255, 255, 255, 0.2);
    padding: 12px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    display: inline-flex;
}

.gradient-card p {
    opacity: 0.95;
    line-height: 1.8;
}

/* Value Cards */
.value-card {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
    transition: all 0.3s;
}

.value-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(30, 64, 175, 0.4);
}

.value-card-icon {
    background: rgba(255, 255, 255, 0.2);
    padding: 12px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    display: inline-flex;
    margin-bottom: 16px;
}

.value-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.value-card p {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.9;
}

/* Timeline */
.timeline {
    margin: 48px 0;
}

.timeline-item {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 32px;
}

.timeline-year {
    font-size: 24px;
    font-weight: bold;
    color: #1e40af;
    margin-bottom: 8px;
}

.timeline-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.timeline-description {
    color: #6b7280;
}

/* Contact Form */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 32px;
}

.contact-info-card {
    background: white;
    padding: 32px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.contact-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.contact-icon {
    color: #1e40af;
    font-size: 20px;
    flex-shrink: 0;
}

.contact-item h4 {
    font-weight: 600;
    margin-bottom: 4px;
}

.contact-item p {
    color: #6b7280;
    font-size: 14px;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #374151;
    font-size: 14px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 150px;
}

.btn-primary {
    background: #1e40af;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration:none;
}

.btn-primary:hover {
    background: #1e3a8a;
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: #1e40af;
    border: 2px solid #1e40af;
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #f9fafb;
}

/* News Grid */
.news-layout .news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin: 32px 0;
}

.news-card {
    background: #fff;
    border-radius: 12px; /* Bo góc mượt hơn theo hình ảnh */
    overflow: hidden;
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    height: 100%;
}

.news-card:hover {
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    transform: translateY(-5px);
}

.news-thumb img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.news-card-content {
    padding: 20px;
}

/* Dàn hàng ngang cho Chuyên mục và Ngày tháng */
.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.news-category {
    color: #1e40af; /* Màu xanh Navy của Metryx */
    font-weight: 700;
    font-size: 13px;
    text-transform: capitalize;
}

.news-date {
    color: #94a3b8;
    font-size: 13px;
}

.news-title {
    font-size: 18px;
    line-height: 1.4;
    color: #1e293b;
    font-weight: 700;
    margin-bottom: 12px;
    /* Giới hạn 2 dòng tiêu đề */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-excerpt {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 15px;
}

.news-readmore {
    color: #1e40af;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

.news-card:hover .news-readmore {
    gap: 12px; /* Hiệu ứng icon dịch chuyển khi hover */
}

.single-news-layout {
    background: #fcfcfc;
    padding: 30px 0 60px;
    margin-top: 30px;
}

.news-main-wrapper {
    display: block;
    grid-template-columns: 1fr 350px; /* Layout chính và Sidebar */
    gap: 40px;
    margin-top: 20px;
}

/* Nội dung bài viết */
.news-detail-content {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid #eee;
}

.post-category {
    color: #1e40af;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 15px;
    display: block;
}

.post-title {
    font-size: 2.4rem;
    color: #1e293b;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 20px;
}

.post-meta {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
    color: #64748b;
    font-size: 14px;
}

.post-meta span { margin-right: 20px; }

.main-thumb img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 30px;
}

.content-text {
    line-height: 1.8;
    color: #334155;
    font-size: 16px;
}

.content-text h2, .content-text h3 {
    margin: 30px 0 15px;
    color: #1e293b;
}

.post-tags {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px dashed #ddd;
    font-size: 14px;
}

.post-tags a {
    background: #f1f5f9;
    padding: 5px 12px;
    border-radius: 4px;
    text-decoration: none;
    color: #475569;
    margin-left: 5px;
}

.content-text img,
.post-entry-content img,
.news-detail-content img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    padding-top: 20px;
    padding-bottom: 20px;
    max-width: 100%; /* Đảm bảo ảnh không tràn khung hình */
    height: auto;
}

/* Hỗ trợ cho các khối Figure (Gutenberg mặc định) */
.content-text figure,
.post-entry-content figure {
    margin-left: auto;
    margin-right: auto;
    padding-top: 20px;
    padding-bottom: 20px;
    text-align: center; /* Căn giữa chú thích ảnh nếu có */
}

.content-text figure img {
    padding-top: 0; /* Reset padding của img nếu đã có ở figure */
    padding-bottom: 0;
}

/* Sidebar bài viết liên quan */
.related-posts-sidebar {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #eee;
    height: fit-content;
}

.sidebar-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 25px;
    color: #1e293b;
}

.related-item a {
    display: flex;
    gap: 15px;
    text-decoration: none;
    padding: 15px 0;
    border-bottom: 1px solid #f1f5f9;
}

.related-item i { color: #1e40af; margin-top: 5px; font-size: 12px; }

.item-info h4 {
    font-size: 15px;
    color: #334155;
    margin-bottom: 5px;
    line-height: 1.4;
}

.item-info span { font-size: 12px; color: #94a3b8; }

.view-all-news {
    display: inline-block;
    margin-top: 25px;
    color: #1e40af;
    font-weight: 700;
    text-decoration: none;
}

/* Product Cards */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 32px 0;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-4px);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card-content {
    padding: 20px;
}

.product-brand {
    color: #1e40af;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-description {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 12px;
}

.product-price {
    color: #1e40af;
    font-weight: 600;
    margin-bottom: 16px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 32px 0;
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.pagination button:hover:not(:disabled) {
    background: #f9fafb;
}

.pagination button.active {
    background: #1e40af;
    color: white;
    border-color: #1e40af;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.featured-image-only img{
    max-width: 450px;
}

/* Footer */
.footer {
    background: #001535;
    color: white;
    padding: 48px 0 16px;
    margin-top: 5px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 200px 200px 200px 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.footer-col {
    min-width: 0;
}

.footer-logo {
    margin-bottom: 16px;
}

.footer-logo-img {
    height: 40px;
    width: auto;
}

.footer-text {
    color: #9ca3af;
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.6;
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social-link {
    color: #9ca3af;
    transition: color 0.3s;
}

.footer-social-link:hover {
    color: white;
}

.footer-heading {
    font-weight: 600;
    margin-bottom: 16px;
    color: white;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 16px;
    text-align: left;
}

.footer-bottom p {
    color: #9ca3af;
    font-size: 14px;
}
/* Grid Layouts */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Cards */
.card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-4px);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #111827;
}

.card-text {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Gradient Cards */
.gradient-card {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: white;
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.gradient-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.gradient-card p {
    opacity: 0.95;
    line-height: 1.8;
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #1e40af;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-6 { margin-bottom: 48px; }
.mb-8 { margin-bottom: 64px; }

.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-6 { margin-top: 48px; }
.mt-8 { margin-top: 64px; }

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    border-top: 1px solid #e5e7eb;
    padding: 16px;
}

.mobile-menu.show {
    display: block;
}

.mobile-nav {
    margin-bottom: 16px;
}

.mobile-nav a {
    display: block;
    padding: 12px;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
}

.mobile-nav a:hover,
.mobile-nav a.active {
    background: #f9fafb;
    color: #1e40af;
}

.mobile-search {
    margin-bottom: 16px;
}

.mobile-contact {
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.mobile-contact a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 12px;
}

.mobile-lang-switch {
    display: flex;
    gap: 8px;
    margin: 16px 0;
}

.mobile-lang-switch button {
    flex: 1;
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.mobile-lang-switch button.active {
    background: #1e40af;
    color: white;
    border-color: #1e40af;
}

.mobile-social {
    display: flex;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.mobile-social a {
    color: #374151;
    transition: color 0.3s;
}

.mobile-social a:hover {
    color: #1e40af;
}

/* Container chính */
.product-slider {
    position: relative;
    padding: 0px; /* Tạo khoảng trống cho mũi tên */
}

/* Tùy chỉnh card để khớp với slider */
.product-card {
    margin: 0 10px; /* Khoảng cách giữa các slide */
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* Nút mũi tên (Slick Arrow) */
.slick-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #eee;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slick-prev { left: 0; }
.slick-next { right: 0; }

/* Dấu chấm phân trang (Dots) */
.slick-dots {
    display: flex;
    justify-content: center;
    list-style: none;
    margin-bottom: 20px;
}

.slick-dots li button {
    font-size: 0;
    width: 20px;
    height: 4px;
    background: #ccc;
    border: none;
    margin: 0 5px;
    border-radius: 2px;
}

.slick-dots li.slick-active button {
    background: #002060; /* Màu Navy chính của METRYX */
    width: 30px;
}
.homepage .products{
    padding:0px 40px;
}
.products .title{
    display: flex;
    justify-content: space-between; /* Đẩy left sang tận cùng bên trái, right sang tận cùng bên phải */
    align-items: center;            /* Căn giữa 2 bên theo chiều dọc để chúng thẳng hàng nhau */
    width: 100%;
}
.products .section-title {
    display: block;
    float:left;
    font-size: 20px;
    font-weight: bold;
    text-transform: uppercase;
    color: #2F43CF;
    margin-top: 40px;
}

.products .title-right{
    border: 1px solid #0568f6;
    padding: 5px 20px;
    font-size: 14px;
    border-radius: 10px;
    font-weight: 700;
}
.products .title-right .arrow{
    padding-left: 10px;
}
.products .title-right a{
    color:#2F43CF;
}
.news-events-section{
    padding: 0px 40px;
}
.news-events-section .grid-layout {
    display: flex;
    gap: 30px;
}

.news-events-section .column-box {
    flex: 1;
    background: #F7FAFD;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.news-events-section .title-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
}

.news-events-section .section-title {
    color: #2F43CF;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
}

.news-events-section .view-all {
    color: #2F43CF;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-events-section .view-all:hover {
    text-decoration: underline;
}

.news-events-section .list-container {
    display: flex;
    flex-direction: column;
    gap: 50px;
}
.news-events-section .news .list-container {
    gap: 0px;
}

/* PHẦN SỰ KIỆN (BÊN TRÁI) */
.news-events-section .event-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.news-events-section .date-badge {
    background-color: #0f2547;
    color: #ffffff;
    min-width: 65px;
    height: 100px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8px;
}

.news-events-section .date-badge .day {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.news-events-section .date-badge .month {
    font-size: 11px;
    font-weight: 600;
    margin-top: 5px;
    opacity: 0.8;
}

.news-events-section .item-thumb {
    width: 140px;
    height: 100px;
    flex-shrink: 0;
}

.news-events-section .item-thumb img,
.news-events-section .item-thumb-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* PHẦN TIN TỨC (BÊN PHẢI) */
.news-events-section .news-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.news-events-section .item-thumb-small {
    width: 100px;
    height: 65px;
    flex-shrink: 0;
}

/* PHẦN NỘI DUNG CHỮ CHUNG */
.news-events-section .item-content {
    flex: 1;
}

.news-events-section .item-title {
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-events-section .events .item-title{
    display: block;
}

.news-events-section .item-title a {
    color: #0f2547;
    text-decoration: none;
    transition: color 0.2s;
}

.news-events-section .item-title a:hover {
    color: #0056b3;
}

.news-events-section .item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #777777;
    font-size: 12px;
}

.news-events-section .item-meta svg {
    color: #888888;
}
.more_link{
    font-size: 14px;
    color: #0568f6;
    font-weight: 500;
}

/* Thiết lập chung để hiển thị */
.company-stats-section{
    margin-top: 40px;
}
.company-stats-section * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.company-stats-section .container-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0px;
}

/* Nền xanh gradient bo góc lớn bọc toàn bộ thanh */
.stats-wrapper {
    /* CẬP NHẬT: Màu nền chính tối hơn để vệt sáng nổi bật */
    /* background: linear-gradient(135deg, #0d62e0 0%, #0045b3 60%, #00338d 100%); <- CŨ */

    /* CẬP NHẬT LỚP NỀN PHỨC TẠP: Kết hợp vệt sáng và nền đậm */
    background:
        /* 1. Điểm Nhấn Sáng Trắng: Tạo điểm khởi đầu rực sáng ở góc dưới trái */
            radial-gradient(circle at 10% 85%, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 15%),
                /* 2. Vệt Sáng Ngang: Tạo đường ánh sáng rực rỡ chạy dọc mép dưới */
            linear-gradient(to right, rgba(0, 120, 255, 0.9) 0%, rgba(0, 70, 180, 0) 50%, rgba(0, 70, 180, 0) 100%),
                /* 3. Dải Màu Nền Đậm: Tạo độ sâu sắc nét hơn */
            linear-gradient(135deg, #004dc0 0%, #002e75 50%, #001f50 100%);

    /* Vị trí và kích thước cho đa nền */
    background-size: cover;
    background-position: center;

    /* Thêm bo góc và căn chỉnh giữ nguyên cấu trúc */
    border-radius: 16px;
    padding: 30px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    overflow: hidden;

    /* CẬP NHẬT: Hiệu ứng bóng đổ sắc nét hơn */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

/* CẬP NHẬT: Sử dụng ::before để tạo đường viền phát sáng ở mép dưới */
.stats-wrapper::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40%; /* Chỉ chạy một phần, giảm dần về phía sau */
    height: 3px; /* Đường viền mỏng sáng */
    background: linear-gradient(to right, #ffffff 0%, rgba(255, 255, 255, 0.9) 10%, rgba(255, 255, 255, 0) 100%);
    opacity: 0.8;
    filter: blur(1px); /* Làm mờ nhẹ đường viền cho tự nhiên */
    pointer-events: none;
    z-index: 1; /* Nằm trên nền */
}

/* --- Các phần còn lại không đổi --- */

/* Đảm bảo chữ số và text luôn hiển thị sắc nét trên nền xanh mới */
.stats-wrapper .counter-number {
    color: #ffffff;
    font-weight: 700;
    position: relative;
    z-index: 2; /* Nằm trên vệt sáng */
}

.stats-wrapper .counter-label {
    color: #e2e8f0; /* Màu trắng đục nhẹ tạo độ tương phản dịu mắt */
    position: relative;
    z-index: 2;
}

/* Đường vạch kẻ dọc ngăn cách giữa thông số và đối tác */
.stats-wrapper .partners-block {
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 40px;
}

/* KHỐI CHỨA CÁC THÔNG SỐ (BÊN TRÁI) */
.company-stats-section .stats-counters {
    display: flex;
    flex: 1;
    justify-content: space-between;
    gap: 20px;
}

/* Từng cột thông số nhỏ */
.company-stats-section .counter-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #ffffff;
}

/* Icon đồng màu xanh sáng */
.company-stats-section .counter-icon svg {
    width: 28px;
    height: 28px;
    color: #fff;
    flex-shrink: 0;
    margin-top: 4px;
}

/* Cụm text bên cạnh icon */
.company-stats-section .counter-content {
    display: flex;
    flex-direction: column;
}

/* Số hiển thị lớn */
.company-stats-section .counter-number {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

/* Dòng giải nghĩa chữ nhỏ màu trắng đục nhẹ */
.company-stats-section .counter-label {
    font-size: 12px;
    color: #cbd5e1;
    line-height: 1.4;
    margin-top: 4px;
}

/* KHỐI CHỨA ĐỐI TÁC (BÊN PHẢI) */
.company-stats-section .partners-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.15); /* Đường gạch dọc ngăn cách */
    padding-left: 40px;
}

/* Tiêu đề đối tác */
.company-stats-section .partners-title {
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Thanh chứa các ô logo trắng */
.company-stats-section .partners-logos {
    display: flex;
    gap: 10px;
}

/* Ô bo góc nền trắng chứa logo */
.company-stats-section .logo-card {
    background: #ffffff;
    border-radius: 8px;
    width: 105px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    overflow: hidden;
}

.company-stats-section .logo-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.newsletter-block {
    max-width: 360px; /* Độ rộng vừa vặn cho form */
}

/* Tiêu đề "Đăng ký nhận tin" */
.newsletter-block .newsletter-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 0.3px;
}

/* Dòng mô tả chữ nhỏ bên dưới */
.newsletter-block .newsletter-desc {
    color: #a0aec0; /* Màu chữ xám đục */
    font-size: 13.5px;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* KHỐI GROUP INPUT VÀ BUTTON */
.newsletter-block .input-group {
    display: flex;
    width: 100%;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.15); /* Viền mờ cho toàn bộ ô nhập */
    border-radius: 8px; /* Bo góc chung */
    background-color: rgba(255, 255, 255, 0.02); /* Nền tối mờ nhẹ phía trong */
    overflow: hidden; /* Để nút không bị tràn ra ngoài góc bo */
    transition: border-color 0.2s;
}

/* Khi người dùng click chọn vào ô input, viền sẽ sáng nhẹ lên */
.newsletter-block .input-group:focus-within {
    border-color: rgba(255, 255, 255, 0.3);
}

/* Ô NHẬP EMAIL */
.newsletter-block .form-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 14px 16px;
    color: #ffffff;
    font-size: 14px;
}

/* Định dạng màu cho chữ mờ (Placeholder) */
.newsletter-block .form-input::placeholder {
    color: #4a5568; /* Màu chữ "Nhập email của bạn" mờ giống mẫu */
    opacity: 1;
}

/* NÚT MŨI TÊN BÊN PHẢI */
.newsletter-block .submit-btn {
    background-color: #1a66ff; /* Màu xanh dương đặc trưng */
    color: #ffffff;
    border: none;
    outline: none;
    width: 54px;
    height:45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
    position: absolute;
    right:0px;
    top:0px;
}

/* Hiệu ứng khi di chuột vào nút */
.newsletter-block .submit-btn:hover {
    background-color: #0052cc;
}

.newsletter-block .submit-btn:active {
    opacity: 0.9;
}

/* Căn chỉnh icon SVG bên trong nút */
.newsletter-block .submit-btn svg {
    display: block;
}

/*About us*/
.why-choose-us {
    padding: 60px 0;
    background-color: #fff;
}

.selection-card {
    display: flex;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 25px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
}

.selection-content {
    flex: 1;
    padding: 50px;
}

.selection-title-main {
    font-size: 28px;
    color: #111;
    font-weight: bold;
    margin-bottom: 35px;
}

.benefit-item {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.benefit-icon {
    flex-shrink: 0;
    margin-top: 3px;
}

.benefit-text h3 {
    font-size: 18px;
    color: #111;
    font-weight: 600;
    margin-bottom: 5px;
}

.benefit-text p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.selection-image {
    width: 45%;
    min-height: 400px;
}

.selection-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* partner Styling */

/* Timeline Styling */
.timeline-section {
    padding: 0;
    background-color: #fcfcfc;
}

.section-subtitle {
    text-align: center;
    color: #666;
    max-width: 600px;
    margin: 0 auto 50px;
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e0e0e0;
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 0px;
    box-sizing: border-box;
}

.timeline-item.left { left: 0; text-align: right; }
.timeline-item.right { left: 50%; text-align: left; }

.timeline-content {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
}

.timeline-content .year {
    color: #1e5fa8;
    font-weight: bold;
    font-size: 20px;
    display: block;
    margin-bottom: 10px;
}

.timeline-dot {
    position: absolute;
    top: 80px;
    width: 12px;
    height: 12px;
    background: #1e5fa8;
    border-radius: 50%;
    z-index: 2;
}

.left .timeline-dot { right: -6px; }
.right .timeline-dot { left: -6px; }

/* Partners & Tags Styling */
.partners-section {
    padding: 60px 0;
}

.partners-card {
    background: #fff;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.tag {
    background: #f5f7f9;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 14px;
    color: #555;
    border: 1px solid #eef0f2;
}

.group-title {
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* CTA Box Styling */
.cta-box {
    margin-top: 60px;
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.cta-content {
    flex: 1;
    padding-right: 40px;
}

.cta-content h3 {
    color: #111;
    font-size: 22px;
    margin-bottom: 15px;
}

.cta-link {
    color: #1e5fa8;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    margin-top: 15px;
}

.cta-image img {
    width: 400px;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
}

.homepage .news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Chia 2 cột */
    gap: 25px;
    margin-top: 40px;
}

.homepage .news-item {
    display: flex; /* Nằm ngang */
    border-radius: 12px;
    padding: 10px;
    align-items: center;
    gap: 20px;
}

.homepage .news-thumb {
    flex: 0 0 120px; /* Cố định độ rộng ảnh */
    height: 120px;
}

.homepage .news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.homepage .news-info h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #002060;
}

.homepage .news-info p {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    margin: 0;
}
/*Product page*/
.product-page-layout {
    display: flex; /* Đưa sidebar và nội dung chính nằm cạnh nhau */
    align-items: flex-start;
    gap: 30px;
}

.product-sidebar {
    flex: 0 0 260px; /* Cố định chiều rộng sidebar bên trái */
    text-align: left; /* Đảm bảo văn bản bộ lọc nằm bên trái */
}

/* Sidebar Container */
/* Layout Flexbox */
.mtx-category-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-start;
}

.mtx-full-width {
    flex: 0 0 100%;
}

/* Sidebar */
.mtx-product-sidebar {
    flex: 0 0 280px;
    text-align: left !important;
}

/* Content Area */
.product-content {
    flex: 1;
}

/* Grid sản phẩm 3 cột */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Fix lỗi lệch giữa cho list lọc */
.mtx-filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mtx-filter-list li label {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    gap: 10px;
    text-align: left;
    cursor: pointer;
    padding: 5px 0;
}

.mtx-count {
    margin-left: auto; /* Đẩy số đếm về bên phải */
    color: #999;
    font-style: normal;
}

.mtx-product-sidebar {
    width: 280px; /* Cố định độ rộng sidebar */
    float: left; /* Hoặc dùng flex ở container cha */
    text-align: left !important; /* Buộc tất cả nội dung căn trái */
}

.mtx-filter-container {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.mtx-filter-main-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Các khối lọc */
.mtx-filter-block {
    margin-bottom: 2rem;
}

.mtx-filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #374151;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f3f4f6;
}

/* Danh sách checkbox - Quan trọng để sửa lỗi lệch giữa */
.mtx-filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mtx-filter-list li {
    margin-bottom: 0.75rem;
}

.mtx-filter-list li label {
    display: flex; /* Dàn hàng ngang */
    align-items: center; /* Căn giữa checkbox và chữ theo chiều dọc */
    justify-content: flex-start; /* Ép toàn bộ về bên trái */
    cursor: pointer;
    font-size: 0.938rem;
    color: #4b5563;
    width: 100%;
}

.mtx-filter-list input[type="checkbox"] {
    margin-right: 12px; /* Khoảng cách giữa ô check và chữ */
    width: 16px;
    height: 16px;
}

/* Số lượng sản phẩm nằm bên phải */
.mtx-count {
    margin-left: auto; /* Đẩy số (2) về cuối hàng bên phải */
    font-style: normal;
    color: #9ca3af;
    font-size: 0.813rem;
}

/* Toolbar */
.product-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    background: #fff;
    border-radius: 5px;
}

/* Product Grid */
.product-content {
    flex: 1;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.product-image {
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-details {
    padding: 15px;
}

.product-sku {
    font-size: 11px;
    color: #999;
    display: block;
    margin-bottom: 5px;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.product-title a {
    text-decoration: none;
    color: #111;
}

.product-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.product-meta span {
    color: #333;
    font-weight: 500;
}
#breadcrumbs{
    margin: 20px 0;
    font-size: 14px;
}
#breadcrumbs a{
    text-decoration:none;
    color: #666;
}
.btn-view-detail {
    display: block;
    width: 100%;
    background: #1e40af; /* Màu xanh Navy của Metryx */
    color: #fff;
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    margin-top: 15px;
    transition: background 0.3s;
}

.btn-view-detail:hover {
    background: #164a85;
}

.mtx-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.mtx-pagination .page-numbers {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #1e5fa8;
    text-decoration: none;
    transition: all 0.3s;
}

.mtx-pagination .page-numbers.current {
    background: #1e5fa8;
    color: #fff;
    border-color: #1e5fa8;
}

.mtx-pagination .page-numbers:hover:not(.current) {
    background: #f0f4f8;
}
/* Toolbar bổ sung */
.product-toolbar {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding: 10px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.view-mode-switcher {
    display: flex;
    gap: 10px;
    margin-left: auto; /* Đẩy sang phải gần sort */
}

.view-icon {
    font-size: 18px;
    color: #ccc;
    cursor: pointer;
    transition: 0.3s;
}

.view-icon.active {
    color: #1e5fa8; /* Màu xanh Navy của bạn */
}

.product-toolbar .sort-options,
.product-toolbar .view-mode-switcher {
    display: flex;
    align-items: center;
}

.product-toolbar .sort-options select{
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-left: 10px;
}

.product-toolbar .right-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* CSS CHO VIEW LIST */
.product-grid.view-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.view-list .product-card {
    display: flex; /* Xếp ngang ảnh và nội dung */
    flex-direction: row;
    align-items: center;
    padding: 15px;
    text-align: left;
}

.view-list .product-image {
    flex: 0 0 250px; /* Độ rộng cố định cho ảnh trong list view */
    margin-bottom: 0;
}

.view-list .product-details {
    flex: 1;
    padding-left: 30px;
}

.view-list .product-excerpt {
    margin: 10px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.view-list .btn-view-detail {
    display: inline-block;
    width: auto;
    padding: 10px 30px;
}

.view-mode-switcher {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 4px;
    margin-right: 15px;
}

.view-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: #666;
    text-decoration: none;
    transition: 0.3s;
}

.view-icon.active {
    background-color: #1e5fa8; /* Màu xanh Navy của Metryx */
    color: #fff;
}

.view-icon:hover:not(.active) {
    background-color: #f5f5f5;
}

.product-detail-layout{
    margin-top:30px;
}

.product-essential-section {
    background: #fff;
    padding: 30px;
    display: flex;
    gap: 40px;
    margin-top: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
}

/* 2. Gallery & Slider */
.product-gallery-block {
    flex: 0 0 450px;
    max-width: 450px;
}

.main-product-slider {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    overflow: hidden;
}

.main-product-slider .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-product-slider .swiper-slide img {
    max-width: 100%;
    height: 450px;
    object-fit: contain;
}

.product-thumbs-slider {
    margin-top: 15px;
}

.mtx-thumb-item {
    width: 100px;
    cursor: pointer;
    opacity: 0.5;
    transition: 0.3s;
}

.mtx-thumb-item.swiper-slide-thumb-active {
    opacity: 1;
}

.mtx-thumb-item img {
    width: 96px;
    height: 100px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 3. Thông tin sản phẩm (Right Side) */
.product-summary-block {
    flex: 1;
}

.product-essential-section .product-brand {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    background: #1e40af;
    padding: 4px 12px;
    border-radius: 4px;
    text-transform: uppercase;
}

.product-main-title {
    font-size: 2.2rem;
    color: #333;
    font-weight: 700;
    margin: 15px 0;
}

.product-sku {
    color: #666;
    font-size: 14px;
    display: block;
    margin-bottom: 25px;
}

.product-sku span {
    color: #333;
    font-weight: 700;
}

.product-excerpt {
    line-height: 1.8;
    color: #555;
    margin-bottom: 30px;
}

/* Container tổng quát cho phần hành động */
.product-actions-container {
    margin-top: 25px;
}

/* Nút báo giá căn giữa và full rộng */
.btn-call-quotation {
    background: #1e40af;
    width: 100%;
    color: #fff;
    padding: 14px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center; /* Đã thêm để icon và text căn giữa */
    gap: 10px;
    margin-bottom: 20px;
}

/* Khối thông tin liên hệ theo style thiết kế */
.contact-info-block {
    background: #f8fafc; /* Màu nền xám nhạt nhẹ hơn */
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.contact-title {
    font-size: 16px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 15px;
    text-transform: none;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-item i {
    color: #1e40af; /* Màu xanh Navy chủ đạo */
    font-size: 16px;
    margin-top: 3px;
    width: 20px;
    text-align: center;
}

.contact-text {
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
}

.contact-text strong {
    color: #1e293b;
    margin-right: 5px;
}

/* Product Section */
.product-tabs-section {
    margin-top: 40px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #eee;
    overflow: hidden;
}

.tab-header {
    display: flex;
    background: #fcfcfc;
    border-bottom: 1px solid #eee;
}

.tab-item {
    padding: 15px 30px;
    cursor: pointer;
    color: #666;
    font-weight: 400;
    transition: 0.3s;
}

.tab-item.active {
    font-weight: 700;
    border-bottom: 3px solid #1e5fa8;
    color: #1e5fa8;
}

.tab-container {
    padding: 30px;
    line-height: 1.8;
}

#description figure.wp-block-image,
#description figure.wp-block-gallery {
    display: none !important;
}

.related-products-section {
    margin-top: 50px;
}

.related-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 25px;
    font-weight: 700;
    text-transform: uppercase;
    border-left: 4px solid #1e5fa8;
    padding-left: 15px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.mtx-product-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: 0.3s;
}

.mtx-product-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.mtx-product-card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    margin-bottom: 15px;
}

.mtx-product-card h4 {
    font-size: 15px;
    color: #333;
    height: 40px;
    overflow: hidden;
    font-weight: 700;
    margin-bottom: 10px;
}

.mtx-product-card .price-label {
    color: #1e5fa8;
    font-weight: 700;
    margin-bottom: 12px;
}

.mtx-product-card .view-detail {
    display: block;
    background: #1e5fa8;
    color: #fff;
    padding: 8px;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
}

.mtx-popup-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.mtx-popup-content {
    background: #fff;
    width: 100%;
    max-width: 700px;
    padding: 40px 30px 30px;
    border-radius: 8px;
    position: relative;
    animation: slideDown 0.3s ease-out;
}

.close-popup {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

.mtx-popup-content h3 {
    color: #1e5fa8;
    margin-bottom: 15px;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
}


@keyframes slideDown {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.mtx-popup-content .wpcf7-form-control {
    width: 100%;
    margin-bottom: 10px;
}


.product-thumbs-slider .swiper-slide {
    opacity: 0.4;
    transition: 0.3s;
    width:100px;
    height:105px;
}
.product-thumbs-slider .swiper-slide-thumb-active {
    opacity: 1;
    border: 2px solid #1e5fa8;
    border-radius: 4px;
}

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.form-container input, .form-container textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.form-container input[type="submit"] {
    background: #1e5fa8;
    color: #fff;
    border: none;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
}

.mtx-popup-content {
    background: #fff;
    width: 100%;
    max-width: 500px;
    padding: 40px 30px 30px 30px;
    border-radius: 8px;
    position: relative;
    animation: slideDown 0.3s ease;
}
/* MẶC ĐỊNH: Ẩn nút trên Mobile và Tablet */
.scroll-top-btn {
    display: none;
}

/* CHỈ HIỂN THỊ TRÊN DESKTOP (Màn hình lớn hơn 992px) */
@media (min-width: 992px) {
    .scroll-top-btn {
        display: flex;             /* Sử dụng flex để căn giữa icon */
        position: fixed;
        bottom: 30px;              /* Cách đáy màn hình 30px */
        right: 30px;                /* CỐ ĐỊNH Ở GÓC TRÁI theo yêu cầu */
        width: 48px;               /* Tăng nhẹ lên 48px cho chuẩn tỷ lệ click */
        height: 48px;
        background-color: #0d62e0; /* Màu xanh dương gốc của bạn */
        color: #ffffff;
        border: none;
        border-radius: 12px;       /* Bo góc mềm mại, hiện đại hơn */
        cursor: pointer;
        align-items: center;
        justify-content: center;
        z-index: 9999;             /* Đảm bảo luôn nằm trên các thành phần khác */

        /* Hiệu ứng mượt mà khi ẩn/hiện, hover và transform */
        opacity: 0;
        visibility: hidden;
        transform: translateY(20px); /* Khi ẩn, nút hơi chìm xuống dưới một chút */
        transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s ease, box-shadow 0.3s ease;

        /* Đổ bóng sâu, mịn hơn */
        box-shadow: 0 4px 14px rgba(13, 98, 224, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }

    /* Hiệu ứng SVG mũi tên bên trong */
    .scroll-top-btn svg {
        transition: transform 0.3s ease;
    }

    /* BẬT HIỂN THỊ: JavaScript tự động thêm class khi cuộn xuống */
    .scroll-top-btn.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0); /* Nút bay ngược nhẹ lên đúng vị trí rất sinh động */
    }

    /* NÂNG CẤP HIỆU ỨNG TƯƠNG TÁC (HOVER) */
    .scroll-top-btn:hover {
        background-color: #0045b3; /* Tối màu nền hơn một chút để nổi bật */
        color: #ffffff;

        /* Hiệu ứng 1: Nhấc nút nhẹ lên và dịch sang trái một tí tạo cảm giác nổi */
        transform: translateY(-5px);

        /* Hiệu ứng 2: Đổ bóng rực sáng lan tỏa (Glow effect) */
        box-shadow: 0 8px 24px rgba(0, 69, 179, 0.4), 0 0 0 4px rgba(13, 98, 224, 0.15);
    }

    /* Mũi tên bên trong nhích nhẹ lên khi hover */
    .scroll-top-btn:hover svg {
        transform: translateY(-2px);
    }

    /* HIỆU ỨNG KHI BẤM XUỐNG (ACTIVE) */
    .scroll-top-btn:active {
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0, 69, 179, 0.3);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .product-page-layout {
        flex-direction: column;
    }
    .product-sidebar {
        flex: 0 0 100%;
    }
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* Responsive Styles */
@media (max-width: 1024px) {
    .search-container,
    .contact-link,
    .social-icons {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .main-nav {
        display: none;
    }

    .mega-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .news-grid,
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-top-flex {
        display: flex;
        align-items: center;
    }

    .logo-container {
        flex-shrink: 0;
        width:230px;
    }
    .header-actions {
        display: flex;
        align-items: center;
        gap: 0px;
        margin-left: auto;
    }
    #main-content{
        padding-top: 70px;
    }
    .grid-2,
    .grid-4,
    .mega-grid,
    .news-grid,
    .product-grid,
    .stats-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .language-selector {
        order: -1;
        width: 100%;
    }

    .language-btn {
        width: 100%;
        justify-content: center;
    }
    .mtx-category-wrapper{
        gap:0px;
    }
    .mtx-product-sidebar {
        margin-bottom: 20px;
    }

    .mtx-filter-container{
        padding:0;
    }

    .mtx-filter-content {
        display: none;
    }

    .mtx-filter-content.open {
        display: block;
        padding: 20px;
    }

    .mtx-filter-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: #fff;
        padding: 14px 16px;
        border-radius: 12px;
        cursor: pointer;
    }

    .mtx-filter-main-title {
        font-size: 16px;
        font-weight: 600;
        margin: 0;
    }

    .mtx-toggle-icon {
        width: 10px;
        height: 10px;
        border-right: 2px solid #333;
        border-bottom: 2px solid #333;
        transform: rotate(45deg);
        transition: 0.3s;
    }

    .mtx-filter-header.active .mtx-toggle-icon {
        transform: rotate(-135deg);
    }

    .mtx-filter-content {
        margin-top: 10px;
    }

    .mtx-filter-content {
        display: none;
    }

    .mtx-filter-content.open {
        display: block;
    }

    .product-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .result-count {
        width: 100%;
        font-size: 14px;
    }

    .right-group {
        width: 100%;
        display: flex;
        align-items: center;
    }

    .sort-options {
        display: flex;
        align-items: center;
        gap: 6px;
    }


    .view-mode-switcher {
        margin-left: auto;
        display: flex;
        gap: 6px;
    }
    .product-content{
        width:100%;
    }
    .page .entry-content .grid,.cta-box{
        display: block;
    }
    .gradient-card{
        margin:20px 0px;
    }
    .stats{
        grid-template-columns: repeat(2, 1fr);
    }
    .page .entry-content figure{
        margin-top:20px;
    }
}

@media (max-width: 992px) {
    .selection-card {
        flex-direction: column;
    }
    .selection-image {
        width: 100%;
        height: 300px;
    }
}

@media (max-width: 992px) {
    .news-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 28px;
    }
}


@media (max-width: 576px) {
    .news-item {
        flex-direction: column;
        text-align: center;
    }

    .news-thumb {
        flex: 0 0 100%;
        width: 100%;
        height: 180px;
    }

    .event-card {
        margin: 10px 0;
    }
}
/* Responsive */
@media (max-width: 991px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
    .mtx-category-wrapper { flex-direction: column; }
    .mtx-product-sidebar { width: 100%; flex: none; }
    .product-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .view-list .product-card {
        flex-direction: column;
    }
    .view-list .product-image {
        flex: 0 0 100%;
        width: 100%;
    }
    .view-list .product-details {
        padding-left: 0;
        padding-top: 15px;
    }
}

@media (max-width: 992px) {
    .product-essential-section {
        flex-direction: column;
        gap: 30px;
        padding: 20px;
    }

    .product-gallery-block {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .main-product-slider .swiper-slide img {
        height: auto;
        max-height: 400px;
    }

    .product-main-title {
        font-size: 1.8rem;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .page-container {
        padding: 20px 10px;
    }

    .tab-header {
        overflow-x: auto;
        white-space: nowrap;
    }

    .tab-item {
        padding: 12px 20px;
        font-size: 14px;
    }

    .mtx-popup-content {
        width: 95%;
        padding: 40px 20px 25px;
    }

    .btn-call-quotation {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-main-title {
        font-size: 1.5rem;
    }
}

.featured-image-only .image-wrapper {
    position: relative;
    padding-bottom: 75%;
    overflow: hidden;
    border-radius: 8px;
}

.featured-image-only .image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}


.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-details {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-sku,
.product-title,
.product-meta {
    flex-shrink: 0;
}

.view-list .product-details {
    display: flex;
    flex-direction: column;
}

.product-excerpt {
    flex-grow: 1;
    margin-bottom: 15px;
}


.btn-view-detail {
    margin-top: auto;
}


.view-list .product-card {
    height: auto;
}

/*update 6-5*/
.home .product-card .news-info, .home .product-card-conten{
    padding:20px;
}
.news-info a{
    color:black;
}

.solutions-slider {
    padding: 0px;
}

/* Card */
.solutions-slider .product-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    margin: 0 12px;
}

.solutions-slider .product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

/* Image */
.solutions-slider .product-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

/* Content */
.solution-content {
    padding: 20px;
}

/* Title */
.solution-content .product-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 10px;
    line-height: 1.4;
}

/* Description */
.solution-content .product-description {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
}
.product-brand {
    font-size: 12px;
    color: #1e40af;
    font-weight: 600;
    margin-bottom: 6px;
}

.slick-slide {
    padding: 10px 0;
}

.solutions-slider .slick-track {
    display: flex !important;
}

.solutions-slider .slick-slide {
    height: auto;
}

.solutions-slider .slick-slide > div {
    height: 100%;
}

/* Card full height */
.solutions-slider .product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.solution-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.solution-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.solution-content .product-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 48px;
}

.solution-content .product-description {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 50px;
}

.solutions-slider .product-card img {
    height: 220px;
    object-fit: cover;
}


/* ===== FIX NEWS HOMEPAGE ===== */

.news-section .section-title {
    text-align: center;
}

.news-section .news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 40px;
    margin-top: 40px;
}

.news-section .news-item {
    display: flex;
    align-items: center;
    gap: 16px;

    background: #f3f4f6;
    padding: 14px;
    border-radius: 12px;

    transition: 0.3s;
}

.news-section .news-item:hover {
    background: #e5e7eb;
}


.news-section .news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* content */
.news-content {
    flex: 1;
}

/* title */
.news-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-title a {
    color: #111827;
}

.news-excerpt {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 1024px) {
    div#n2-ss-1 .n-uc-IbNOabpfT5aE,div#n2-ss-1 .n-uc-rWsQsj3i4bfV,div#n2-ss-1 .n-uc-UZpz0wyhcAGj{
        max-width:1620px!important;
    }
}

@media (max-width: 768px) {
    .news-layout .news-grid {
        grid-template-columns: 1fr !important;
    }
}

/* HỖ TRỢ HIỂN THỊ TRÊN DI ĐỘNG & MÀN HÌNH NHỎ (RESPONSIVE) */
@media (max-width: 1100px) {
    .company-stats-section .stats-wrapper {
        flex-direction: column;
        align-items: stretch;
        padding: 30px;
    }

    .company-stats-section .partners-block {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.15); /* Chuyển gạch dọc thành gạch ngang */
        padding-left: 0;
        padding-top: 25px;
    }
}

@media (max-width: 768px) {
    .company-stats-section .stats-counters {
        flex-direction: column;
        gap: 25px;
    }

    .company-stats-section .partners-logos {
        flex-wrap: wrap; /* Tự động xuống dòng nếu màn hình điện thoại quá bé */
    }

    .company-stats-section .logo-card {
        flex: 1 1 calc(33.33% - 10px); /* Chia 3 cột trên điện thoại */
        min-width: 90px;
    }
    .custom-logo-link img {
        max-width: 150px;
        max-height: 60px;
    }
}


/* HỖ TRỢ DI ĐỘNG (RESPONSIVE) */
@media (max-width: 992px) {
    .news-events-section .grid-layout {
        flex-direction: column;
    }
}
