/* ================= VARIABLES ================= */
* {
    box-sizing: border-box;
}
:root {
    --primary-dark: #013d1e; /* Màu xanh lá đậm chuẩn HP89 */
    --primary-brown: #3e2723;
    --bg-cream: #f8f7f2;
    --text-dark: #1a1a1a;
    --text-gray: #666;
    --accent: #d39b56; /* Màu cam đất của line kẻ */
    --white: #ffffff;
    --font-main: 'Manrope', sans-serif;
}

html {
    scroll-behavior: smooth; /* Tạo hiệu ứng cuộn trang mượt mà */
    scroll-padding-top: 80px; /* Trừ hao khoảng không bằng đúng chiều cao của thanh menu để chữ không bị che mất */
    overflow-x: hidden;
}
body { font-family: var(--font-main); color: var(--text-dark); line-height: 1.6; background: var(--white); font-size: 15px; min-width: 1280px; overflow-x: hidden;}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ================= UTILITIES ================= */
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.section-padding { padding: 80px 0; }
.relative { position: relative; }
.text-white { color: var(--white); }
.text-dark { color: var(--text-dark); }
.center { text-align: center; }
.text-right { text-align: right; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2.5rem; }
.bg-cream { background-color: var(--bg-cream); }
.bg-dark-green { background-color: var(--primary-dark); }
.bg-dark-brown { background-color: var(--primary-brown); }
.bg-light-green { background-color: #eef2eb; }
.inline-block { display: inline-block; }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.3; }
.section-title { font-size: 2.2rem; color: var(--text-dark); margin-bottom: 10px; }
.divider { width: 40px; height: 3px; background: var(--accent); border: none; margin: 15px 0; }
.divider.center { margin: 15px auto; }
.link-arrow { font-size: 0.9rem; font-weight: 700; display: inline-block; margin-top: 15px; color: var(--text-dark); }
.link-arrow:hover { color: var(--accent); }

/* Buttons */
.btn { padding: 12px 28px; border-radius: 50px; font-weight: 600; font-size: 0.95rem; display: inline-flex; align-items: center; justify-content: center; transition: 0.3s; }
.btn-dark { background: var(--primary-dark); color: var(--white); border: 1px solid var(--primary-dark); }
.btn-dark:hover { background: transparent; color: var(--primary-dark); }
.btn-outline { border: 1px solid var(--primary-dark); color: var(--primary-dark); background: transparent; }
.btn-outline:hover { background: var(--primary-dark); color: var(--white); }

/* ================= HEADER ================= */
.header { position: fixed; top: 0; width: 100%; background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); z-index: 1000; padding: 15px 0; border-bottom: 1px solid #eee; }
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.logo img { height: 60px; }
.nav-menu ul { display: flex; gap: 30px; }
.nav-menu a { font-size: 0.9rem; font-weight: 600; padding-bottom: 5px; position: relative; }
.nav-menu a.active::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background: var(--accent); }

/* ================= HERO ================= */
.hero { position: relative; min-height: 650px; display: flex; align-items: center; background: var(--bg-cream); overflow: hidden; padding-top: 70px; }
.hero-bg-wrapper { position: absolute; top: 0; right: 0; width: 55%; height: 100%; mask-image: linear-gradient(to right, transparent 0%, black 30%); -webkit-mask-image: linear-gradient(to right, transparent 0%, black 30%); z-index: 1; }
.hero-bg-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.hero-container { z-index: 2; width: 100%; }
.hero-content { max-width: 45%; }
.hero h1 { font-size: 3rem; margin-bottom: 20px; }
.hero p { font-size: 1.1rem; color: var(--text-gray); margin-bottom: 30px; }
.hero-buttons { display: flex; gap: 15px; }

/* ================= VÌ SAO CHỌN ================= */
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; text-align: center; }
.feature-item img { height: 45px; margin-bottom: 20px; }
.feature-item h3 { font-size: 1.1rem; margin-bottom: 10px; }
.feature-item p { font-size: 0.9rem; color: var(--text-gray); }

/* ================= GIẢI PHÁP ================= */
.grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.solution-card { background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: 0.3s; }
.solution-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.sol-img { width: 100%; height: 120px; object-fit: cover; }
.sol-content { padding: 20px; position: relative; }
.sol-icon { width: 50px; height: 40px; position: absolute; top: -20px; left: 20px; background: var(--white); border-radius: 50%; padding: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.sol-content h3 { font-size: 1.1rem; margin: 15px 0 10px; }
.sol-content p { font-size: 0.85rem; color: var(--text-gray); line-height: 1.5; }

/* ================= HỆ SINH THÁI (DIAGRAM) ================= */
.grid-eco { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: center; } /* Chia cột cho bên phải rộng hơn để chứa sơ đồ */
.eco-left h2 { font-size: 2.8rem; margin-bottom: 10px; }
.eco-left p { font-size: 1.05rem; line-height: 1.6; color: var(--text-gray); margin-bottom: 30px; }
.eco-right { position: relative; display: flex; justify-content: center; align-items: center; }

/* Khung bọc sơ đồ - Cố định kích thước để tọa độ không bị nhảy */
.eco-diagram { position: relative; width: 100%; max-width: 600px; height: 500px; margin: 0 auto; }

/* Vòng tròn đứt nét - Đường kính 320px (Bán kính 160px) */
.eco-circle-dashed {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 320px; height: 320px;
    border: 1px dashed #a0a0a0;
    border-radius: 50%;
    z-index: 1;
}

/* Khối Logo ở giữa */
.eco-center { 
    position: absolute; 
    top: 50%; left: 50%; 
    transform: translate(-50%, -50%); 
    width: 140px; height: 140px; 
    background: var(--white); 
    border-radius: 50%; 
    display: flex; justify-content: center; align-items: center; 
    z-index: 10; 
    box-shadow: 0 5px 25px rgba(0,0,0,0.08); 
}
.center-logo { width: 75%; height: auto; object-fit: contain; }

/* Các Điểm Nhánh (Nodes) */
.eco-node {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10;
    width: max-content; /* Ngăn chữ bị ép co cụm lại */
}
.icon-circle {
    width: 50px; height: 50px;
    background: var(--primary-dark);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.icon-circle img { width: 22px; filter: brightness(0) invert(1); }
.node-text h4 { font-size: 0.95rem; color: var(--primary-dark); margin-bottom: 5px; text-transform: uppercase; }
.node-text p { font-size: 0.85rem; color: var(--text-gray); line-height: 1.5; }

/* ================= TỌA ĐỘ GĂN CHÍNH XÁC VÀO VÒNG TRÒN ================= */
/* Các node Trên, Dưới, Phải đều mặc định xếp ngang (Icon bên trái, chữ bên phải) */

/* Điểm Trên cùng */
.node-top {
    top: calc(50% - 160px); /* 160px là bán kính đường tròn */
    left: 50%;
    /* Kéo lùi sang trái 25px (nửa icon) để tâm icon chạm đỉnh tròn, kéo lùi lên trên 50% để chữ căn giữa icon */
    transform: translate(-25px, -50%); 
    text-align: left;
}

/* Điểm Dưới cùng */
.node-bottom {
    top: calc(50% + 160px);
    left: 50%;
    /* Kéo lùi sang trái 25px và lùi lên trên 50% tương tự như điểm trên */
    transform: translate(-25px, -50%);
    text-align: left;
}

/* Điểm bên Phải */
.node-right {
    top: 50%;
    left: calc(50% + 160px);
    transform: translate(-25px, -50%);
    text-align: left;
}

/* Điểm bên Trái (Duy nhất điểm này Icon nằm bên phải, chữ nằm bên trái) */
.node-left {
    top: 50%;
    right: calc(50% + 160px);
    flex-direction: row-reverse; /* Lệnh này đảo ngược vị trí chữ và icon */
    text-align: right;
    /* Đẩy sang phải 25px để tâm icon chạm nét đứt */
    transform: translate(25px, -50%);
}

/* Position the 4 nodes like a cross */
.eco-node { position: absolute; display: flex; align-items: flex-start; gap: 15px; width: 280px; }
.eco-node h4 { font-size: 0.9rem; margin-bottom: 5px; color: var(--primary-dark); }
.eco-node p { font-size: 0.8rem; color: var(--text-gray); }
.icon-circle { width: 45px; height: 45px; background: var(--primary-dark); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.icon-circle img { width: 20px; filter: brightness(0) invert(1); }

.node-top { top: 0; left: 50%; transform: translateX(-50%); flex-direction: column; align-items: center; text-align: center; }
.node-bottom { bottom: 0; left: 50%; transform: translateX(-50%); flex-direction: column-reverse; align-items: center; text-align: center; }
.node-right { top: 50%; right: -50px; transform: translateY(-50%); }
.node-left { top: 50%; left: -80px; transform: translateY(-50%); flex-direction: row; }

/* Connecting Lines (Dùng border tròn chìm dưới background) */
.eco-diagram::before { content: ''; position: absolute; top: 50px; left: 50px; right: 50px; bottom: 50px; border: 1px dashed #ccc; border-radius: 50%; z-index: 0; }
.eco-diagram::after { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; border-top: 1px dashed #ccc; z-index: 0; }

/* ================= THƯƠNG HIỆU ================= */
.grid-brands { display: grid; grid-template-columns: 2fr 2fr 1fr; gap: 20px; }
.brand-box { border-radius: 16px; padding: 30px; position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; }
.brand-info { position: relative; z-index: 2; max-width: 60%; }
.brand-info h3 { font-size: 1.8rem; letter-spacing: 1px; }
.brand-sub { font-size: 0.8rem; letter-spacing: 2px; margin-bottom: 15px; opacity: 0.8; }
.brand-img { position: absolute; right: -20px; bottom: 0; height: 100%; object-fit: contain; z-index: 1; }
.brand-icon-center { position: absolute; right: 20px; bottom: 20px; width: 60px; opacity: 0.2; }

/* ================= QUY TRÌNH & CON SỐ ================= */
.grid-process { display: grid; grid-template-columns: 1.5fr 1fr; gap: 30px; }
.process-box, .stats-box { border-radius: 16px; padding: 50px; }
.process-steps { display: flex; justify-content: space-between; align-items: center; }
.step { text-align: center; }
.step img { 
    height: 40px; 
    margin-bottom: 15px; 
    
    /* Thủ thuật xử lý ảnh có nền trắng */
    filter: invert(1); 
    mix-blend-mode: screen; 
}
.step span { display: block; font-size: 0.85rem; font-weight: 600; }
.arrow { color: rgba(255,255,255,0.3); font-size: 1.5rem; }

.stat-item { display: flex; align-items: center; gap: 15px; border-bottom: 1px solid #ddd; padding: 20px 0; }
.stat-item:nth-child(3), .stat-item:nth-child(4) { border-bottom: none; }
.stat-item img { width: 40px; }
.stat-item h3 { font-size: 2rem; color: var(--primary-dark); }
.stat-item p { font-size: 0.85rem; color: var(--text-gray); }

/* ================= GÓC NHÌN & TIN TỨC ================= */
.grid-news { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.news-card { border-radius: 12px; overflow: hidden; border: 1px solid #eee; background: var(--white); display: flex; flex-direction: column; }
.news-card img { width: 100%; height: 140px; object-fit: cover; }
.news-content { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.tag { font-size: 0.75rem; background: var(--primary-dark); color: var(--white); padding: 4px 10px; border-radius: 4px; align-self: flex-start; margin-bottom: 15px; }
.news-content h4 { font-size: 1rem; margin-bottom: auto; }
/* Định dạng thẻ Xem tất cả bài viết */
.news-card.view-all {
    background-color: var(--primary-dark); /* Màu xanh đậm */
    border: none; /* Bỏ viền xám */
}

.view-all-link {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%;
    padding: 30px;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    transform: scale(1.05); /* Hiệu ứng phóng to nhẹ khi trỏ chuột vào */
}

.view-all-link img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-bottom: 20px;
    filter: brightness(0) invert(1); /* Biến icon thành màu trắng */
}

.view-all-link h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--white);
    text-transform: none;
}

.view-all-link .arrow {
    font-size: 1.5rem;
    margin-top: 10px;
}

/* ================= FOOTER ================= */
.footer { padding: 80px 0 20px; font-size: 0.85rem; }
.grid-footer { display: grid; grid-template-columns: 2.5fr 1fr 1fr 1.5fr 1.5fr; gap: 30px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 40px; }
.footer-logo { height: 80px; margin-bottom: 20px; }
.brand p { opacity: 0.7; margin-bottom: 20px; max-width: 90%; }
.socials a { display: inline-block; margin-right: 10px; }
.socials img { width: 35px; }
.footer-col h4 { font-size: 0.9rem; margin-bottom: 20px; letter-spacing: 1px; }
.footer-col ul li { margin-bottom: 12px; opacity: 0.7; }
.footer-col ul li a:hover { opacity: 1; color: var(--accent); }
.contact p { display: flex; gap: 10px; margin-bottom: 15px; opacity: 0.8; }
.contact img { width: 18px; height: 18px; filter: brightness(0) invert(1); }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 20px; opacity: 0.6; }

/* ================= ANIMATION ================= */
.fade-up { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* Chỉnh ảnh logo nằm giữa sơ đồ */
.center-logo {
    width: 65%; /* Thu nhỏ ảnh lại 75% để không bị viền tròn cắt mất góc vuông */
    height: auto;
    object-fit: contain; /* Giữ nguyên tỷ lệ gốc của ảnh */
}

/* ================= KHÓA TRÀN LỀ (FIX LỖI KHOẢNG TRẮNG BÊN PHẢI) ================= */
html, body {
    width: 100%;
    min-width: 1280px;
    overflow-x: hidden !important; /* Khóa chết lề ngang, cắt bỏ mọi thứ tràn ra ngoài */
    position: relative;
    margin: 0;
    padding: 0;
}

/* Đảm bảo thanh Menu và Footer luôn kéo dài đủ 1280px, không bị co rút */
.header, .footer, .hero {
    min-width: 1280px;
}

/* Ép thủ phạm (nhánh bên phải sơ đồ) rớt dòng sớm hơn để không chọc ra ngoài viền */
.node-right {
    width: 210px !important; 
}

/* ================= CÂN ĐỐI LẠI SƠ ĐỒ HỆ SINH THÁI ================= */
.grid-eco {
    grid-template-columns: 1.2fr 1.8fr; /* Cấp thêm không gian an toàn cho cột chứa sơ đồ bên phải */
    gap: 10px; /* Thu hẹp bớt khoảng trống ở giữa */
}

.eco-diagram {
    transform: translateX(-50px); /* Xích toàn bộ sơ đồ sang trái 50px để cân bằng */
}

/* ================= LÀM NỔI BẬT CÁC NÚT TÌM HIỂU TRÊN NỀN TỐI ================= */
.brand-info .link-arrow,
.process-box .link-arrow {
    background-color: var(--accent); /* Đổ màu nền vàng/cam đất */
    color: var(--white) !important; /* Đổi màu chữ thành trắng cho nổi bật */
    padding: 8px 18px; /* Căn chỉnh khoảng trống quanh chữ để tạo thành khung chữ nhật */
    border-radius: 6px; /* Bo tròn nhẹ 4 góc của khung cho tinh tế */
    display: inline-block;
    width: max-content; /* Lệnh quan trọng: Ép cái khung phải ôm sát khít vào chữ */
    margin-top: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Đổ bóng nhẹ cho nút nổi hẳn lên mặt nền */
    transition: all 0.3s ease; /* Tạo độ mượt khi rê chuột */
}

/* Hiệu ứng khi người dùng đưa chuột vào nút */
.brand-info .link-arrow:hover,
.process-box .link-arrow:hover {
    background-color: var(--white); /* Nền chuyển sang trắng */
    color: var(--primary-dark) !important; /* Chữ chuyển về màu xanh đậm */
    transform: translateY(-3px); /* Nút hơi nảy nhẹ lên trên */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}