/* Reset & General */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body { line-height: 1.6; color: #333; }
.container { max-width: 1100px; margin: auto; padding: 0 2rem; overflow: hidden; }
.section { padding: 4rem 1rem; }
.section-title { text-align: center; margin-bottom: 2rem; font-size: 2rem; color: #0044cc; }
.bg-light { background: #f4f4f4; }
.btn { display: inline-block; background: #0044cc; color: #fff; padding: 0.8rem 2rem; border: none; cursor: pointer; text-decoration: none; border-radius: 5px; }

/* Header */
header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}
/* Container chứa logo, làm cho nó có thể click được */
.logo-wrapper {
    display: flex;
    align-items: center;
    text-decoration: none; /* Bỏ gạch chân */
    color: inherit; /* Giữ màu chữ */
    gap: 15px; /* Khoảng cách giữa hình và chữ */
}

/* Định dạng hình ảnh logo */
.company-logo {
    height: 70px; /* Chiều cao tối đa của logo trên desktop */
    width: auto; /* Giữ tỷ lệ ảnh */
    display: block;
}

/* Container cho phần chữ bên cạnh logo */
.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo {font-family: 'Playfair Display', serif;font-style: italic; color: transparent; /* Làm rỗng ruột chữ */
    -webkit-text-stroke: 2px #0056b3; font-size: 1.5rem; font-weight: bold; color: #0044cc; }
.logo span { color: #333; }

.nav-links { display: flex; list-style: none; }
.nav-links li a { padding: 0.5rem 1rem; text-decoration: none; color: #333; font-weight: 500; transition: 0.3s; }
.nav-links li a:hover { color: #0044cc; }
.lang-selector {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-left: 20px;
}

.flag-icon {
    width: 28px;
    height: auto;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.3s ease;
    filter: grayscale(60%); /* Làm mờ các lá cờ chưa chọn */
    border: 2px solid transparent;
}

.flag-icon:hover {
    transform: scale(1.2);
    filter: grayscale(0%);
}

.flag-icon.active {
    filter: grayscale(0%);
    border-bottom: 2px solid #0044cc; /* Đánh dấu ngôn ngữ hiện tại */
    transform: scale(1.1);
}

/* Ẩn selector cũ nếu còn */
#langSelect { display: none; }
/* Hero */
.hero {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), 
                url('./img/background.jpg');
    background-size: cover;
    background-position: center;
    height: 80vh;
    display: flex;
    align-items: center;
    color: #fff;
    text-align: center;
}

.hero h1 { font-size: 3rem; margin-bottom: 1rem; }

/* About Grid */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }

/* Contact */
.contact-wrapper { display: flex; justify-content: center; align-items: center; grid-template-columns: 2fr 1fr; gap: 2rem; }
#contactForm input, #contactForm textarea { width: 100%; padding: 0.8rem; margin-bottom: 1rem; border: 1px solid #ccc; border-radius: 4px; }

/* Responsive */
.menu-toggle { display: none; cursor: pointer; font-size: 1.5rem; }

@media (max-width: 768px) {
    .about-grid, .contact-wrapper { display: grid; grid-template-columns: 1fr; }
    .contact-img {margin: 0 auto;}
    .nav-links { display: none; } /* Đơn giản hóa cho mobile */
    .menu-toggle { display: block; }
    .hero h1 { font-size: 2rem; }
}
@media (max-width: 600px) {
    .hero h1 {
        font-size: 1.6rem; /* Giảm size chữ tiêu đề trên mobile */
        padding: 0 10px;
    }
    .logo {
        font-size: 1rem;
    }
}


@media (max-width: 768px) {
    nav {
        height: 70px; /* Giảm chiều cao trên mobile */
        padding: 0 1rem;
    }

    .company-logo {
        height: 50px; /* Logo nhỏ hơn trên mobile */
    }

    .brand-name {
        font-size: 1.2rem; /* Chữ nhỏ hơn */
    }

    .brand-subtext {
        font-size: 0.8rem;
    }
}
/* Layout cho Gallery */
.about-gallery {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.reveal-img {
    opacity: 0;
    transform: translateY(50px); /* Đẩy xuống 50px */
    transition: all 0.8s ease-out; /* Thời gian chuyển động */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.reveal-img img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

/* Class này sẽ được JS thêm vào khi scroll tới */
.reveal-img.active {
    opacity: 1;
    transform: translateY(0);
}

/* Hiệu ứng trễ cho từng hình (tạo cảm giác lần lượt) */
.reveal-img:nth-child(2) { transition-delay: 0.2s; }
.reveal-img:nth-child(3) { transition-delay: 0.4s; }


.representative-section {
    padding: 60px 0;
    text-align: center;
}

.business-card {
    max-width: 500px;
    margin: 40px auto;
    perspective: 1000px;
}

.card-inner {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    text-align: left;
    border: 1px solid #eee;
}

.card-content {
    padding: 40px;
    position: relative;
    z-index: 2;
}

.card-header-rep {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #1a5cff;
    padding-bottom: 15px;
}

.card-logo-top {
    height: 40px;
    margin-right: 15px;
}

.company-name-mini {
    font-size: 12px;
    font-weight: bold;
    color: #555;
    text-transform: uppercase;
}

.rep-name {
    font-size: 26px;
    color: #222;
    margin: 0;
    letter-spacing: 1px;
}

.rep-title {
    color: #1a5cff;
    font-weight: 600;
    margin: 5px 0 25px 0;
    font-size: 16px;
}

.rep-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rep-item {
    display: flex;
    align-items: center;
    color: #444;
    font-size: 16px;
}

.rep-item i {
    width: 30px;
    color: #1a5cff;
    font-size: 18px;
}

.rep-item a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.rep-item a:hover {
    color: #1a5cff;
}

/* Miếng trang trí ở góc card cho sang trọng */
.card-accent {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 100px;
    height: 100px;
    background: #1a5cff;
    transform: rotate(45deg);
    z-index: 1;
    opacity: 0.1;
}

/* Trạng thái ban đầu của Card */
.business-card {
    opacity: 0;
    transform: translateX(-100px); /* Đẩy sang trái 100px */
    transition: all 1.2s ease-out; /* Thời gian chạy hiệu ứng */
    filter: blur(5px); /* Thêm chút hiệu ứng mờ cho nghệ thuật */
}

/* Khi cuộn đến, JavaScript sẽ thêm class này */
.business-card.show {
    opacity: 1;
    transform: translateX(0); /* Trở về vị trí gốc */
    filter: blur(0);
}
/* Container chính */
.qr-social-container {
    display: flex;
    justify-content: center; /* Căn giữa toàn bộ khối */
    gap: 20px;               /* Khoảng cách đều giữa các cột */
    margin-top: 25px;
    padding: 10px;
}

/* Từng cột QR */
.qr-item {
    display: flex;
    flex-direction: column;  /* Xếp ảnh trên, chữ dưới */
    align-items: center;     /* Căn giữa theo trục dọc */
    flex: 1;                 /* Chia đều độ rộng cho mỗi cột */
    max-width: 80px;         /* Giới hạn độ rộng tối đa */
    cursor: pointer;
}

/* Khung chứa ảnh để ảnh luôn cùng kích thước */
.qr-img-box {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;      /* Khoảng cách giữa ảnh và chữ */
}

.qr-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;       /* Đảm bảo ảnh không bị méo */
    border-radius: 8px;
    border: 1px solid #eee;
    transition: transform 0.2s;
}

/* Căn chỉnh chữ phía dưới */
.qr-item p {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    text-align: center;      /* Căn chữ ra chính giữa ảnh */
    white-space: nowrap;     /* Không cho chữ xuống dòng */
}

/* Hiệu ứng khi di chuột */
.qr-item:hover img {
    transform: scale(1.05);
    border-color: #003366;
}
/* Nền tối phía sau Popup */
.modal {
    display: none; 
    position: fixed; 
    z-index: 9999; 
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8); /* Làm tối nền */
    backdrop-filter: blur(5px); /* Làm mờ nền phía sau */
}

/* Ảnh QR hiện ra chính giữa */
.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 350px; /* Không cho ảnh to quá */
    border-radius: 15px;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    animation: zoomIn 0.3s;
}

/* Nút đóng (X) */
.close-btn {
    position: absolute;
    top: 20px; right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* Hiệu ứng phóng to khi mở */
@keyframes zoomIn {
    from {transform: translateY(-50%) scale(0)} 
    to {transform: translateY(-50%) scale(1)}
}