/* --- General Styling & Variables --- */
:root {
    --primary-color: #0056b3;
    --secondary-color: #007bff;
    --dark-color: #2c3e50;
    --light-color: #f4f4f4;
    --text-color: #333;
    --white-color: #ffffff;
    --border-radius: 8px;
    --box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white-color);
}

.container {
    max-width: 1100px;
    margin: auto;
    padding: 0 2rem;
}

/* --- Navigation Bar --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem; /* Tăng padding cho thoáng hơn */
    background-color: transparent; /* Nền trong suốt mặc định */
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.4s ease, box-shadow 0.4s ease; /* Hiệu ứng chuyển đổi mượt mà */
}

.navbar.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.85); /* Nền trắng mờ khi cuộn */
    backdrop-filter: blur(10px); /* Hiệu ứng kính mờ */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    transition: transform 0.3s ease;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-item {
    margin-left: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    transition: color 0.3s ease;
    position: relative; /* Cần cho hiệu ứng gạch chân */
    padding: 5px 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

/* Hiệu ứng gạch chân khi hover */
.nav-link::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transform-origin: center;
    transition: transform 0.3s ease-out;
}

.nav-link:hover::after, .nav-link.active::after {
    transform: scaleX(1);
}

.nav-logo:hover {
    transform: scale(1.05); /* Phóng to nhẹ logo khi hover */
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--dark-color);
}

.btn-secondary:hover {
    background-color: #4e6073;
}

/* --- Hero Section (Home Page) --- */
.hero-section {
    height: 80vh;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('../images/banner-ar.jpg') no-repeat center center/cover;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white-color);
    padding: 0 1rem;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    /* --- Hiệu ứng chữ gradient chuyển động --- */
    background: linear-gradient(90deg, #a7c5ff, var(--white-color), #a7c5ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    /* Kích thước nền lớn hơn để có không gian cho animation */
    background-size: 200% 100%;
    /* Animation */
    animation: gradient-shine 5s linear infinite;
    /* ----------------------------------------- */
    /* Thêm shadow để chữ nổi bật hơn trên nền */
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.7));
}

/* --- General Sections --- */
.intro-section, .guide-section, .faq-section, .about-section, .collection-section {
    padding: 4rem 0;
}

.intro-section {
    text-align: center;
    background-color: var(--light-color);
}

.intro-text {
    max-width: 800px;
    margin: 1rem auto 3rem;
    font-size: 1.1rem;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.feature-list li {
    text-align: justify;
}
/* =================================
   Styling cho Feature List
   ================================= */
.feature-list {
    list-style: none; /* Bỏ đi kiểu danh sách mặc định */
    counter-reset: feature-counter; /* Tạo một bộ đếm tùy chỉnh */
    padding-left: 0; /* Xóa khoảng đệm bên trái mặc định */
    margin-top: 2rem;
}

.feature-list li {
    counter-increment: feature-counter; /* Tăng giá trị bộ đếm cho mỗi mục */
    background-color: #ffffff; /* Nền trắng cho mỗi thẻ */
    border-left: 5px solid #0056b3; /* Đường viền màu xanh bên trái để nhấn mạnh */
    padding: 1.5rem;
    margin-bottom: 1.5rem; /* Tăng khoảng cách giữa các mục */
    border-radius: 8px; /* Bo tròn các góc */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* Thêm bóng đổ nhẹ nhàng */
    position: relative; /* Cần thiết để định vị cho pseudo-element ::before */
    padding-left: 4.5rem; /* Tạo không gian cho số thứ tự tùy chỉnh */
    text-align: justify; /* Căn đều văn bản cho đẹp mắt */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Hiệu ứng chuyển động mượt mà */
}

.feature-list li:hover {
    transform: translateY(-5px); /* Nhấc thẻ lên một chút khi di chuột qua */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12); /* Tăng bóng đổ để tạo chiều sâu */
}

/* Tạo kiểu cho số thứ tự tùy chỉnh */
.feature-list li::before {
    content: counter(feature-counter); /* Hiển thị giá trị của bộ đếm */
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    background-color: #0056b3; /* Nền cùng màu với viền trái */
    color: white; /* Chữ màu trắng */
    font-weight: bold;
    font-size: 1.2rem;
    width: 2.5rem; /* Chiều rộng của vòng tròn số */
    height: 2.5rem; /* Chiều cao của vòng tròn số */
    border-radius: 50%; /* Tạo thành hình tròn */
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}


.feature-item {
    background: var(--white-color);
    padding: 2rem;
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* --- Page Header (for subpages) --- */
.page-header {
    background-color: var(--dark-color);
    color: var(--white-color);
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
}

/* --- Collection Page --- */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card:hover .card-img {
    transform: scale(1.05);
}

.card-body h3 {
    margin-bottom: 0.5rem;
}

.card-body p {
    margin-bottom: 1rem;
    flex-grow: 1;
}

.card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.qr-code {
    width: 80px;
    height: 80px;
}

.card-special {
    background-color: var(--primary-color);
    color: var(--white-color);
    justify-content: center;
    align-items: center;
    text-align: center;
    grid-column: 1 / -1; /* Khiến thẻ này chiếm toàn bộ chiều rộng của hàng */
}

/* --- Collection Page - New Item Design --- */
.collection-item {
    background-color: var(--white-color);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.collection-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.item-video-wrapper {
    position: relative;
    /* Tỷ lệ 9:16 (16/9 * 100) */
    padding-top: 177.77%; 
    width: 100%;
    background-color: #000;
}

.item-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.item-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    /* Giúp footer của card luôn ở dưới */
    flex-grow: 1; 
}

.item-header {
    display: flex;
    align-items: center;
    /* Sử dụng margin auto để căn giữa khi có đủ không gian */
    margin-left: auto;
    margin-right: auto;
    gap: 1rem;
    margin-bottom: 1rem;
}

.item-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.item-title {
    margin: 0;
    font-size: 1.5rem;
    color: var(--dark-color);
}

.item-meta {
    /* Đặt chiều cao tối thiểu để các thẻ có nội dung ngắn vẫn giữ được bố cục cân đối */
    min-height: 80px;
}

.item-meta p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.item-actions {
    /* Đẩy nút xuống cuối card */
    margin-top: auto; 
}

/* --- Guide Page --- */
.guide-section .container {
    max-width: 900px; /* Thu hẹp container để dễ đọc hơn */
}

.guide-part {
    margin-bottom: 4rem;
}

.guide-part h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.guide-step {
    margin-bottom: 2.5rem;
    position: relative;
    padding-left: 3.5rem; /* Tạo không gian cho số thứ tự */
    border-left: 3px solid #e0e0e0; /* Đường timeline */
}

.guide-step h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

/* Tạo số thứ tự cho mỗi bước */
.guide-step::before {
    content: '';
    position: absolute;
    left: -1.25rem; /* Căn chỉnh với đường timeline */
    top: 0;
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--white-color);
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    z-index: 1;
    /* Thêm số vào trong vòng tròn */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Đặt số cho từng bước */
.guide-part:nth-of-type(1) .guide-step:nth-of-type(1)::before { content: '1'; }
.guide-part:nth-of-type(1) .guide-step:nth-of-type(2)::before { content: '2'; }
.guide-part:nth-of-type(1) .guide-step:nth-of-type(3)::before { content: '3'; }
.guide-part:nth-of-type(2) .guide-step:nth-of-type(1)::before { content: '1'; }
.guide-part:nth-of-type(2) .guide-step:nth-of-type(2)::before { content: '2'; }

/* Bước cuối cùng không cần đường timeline kéo dài xuống */
.guide-step:last-child {
    border-left-color: transparent;
}

.guide-sub-step {
    display: flex;
    /* Thay đổi: Chuyển sang bố cục cột */
    flex-direction: column;
    align-items: flex-start; /* Căn các mục về bên trái */
    gap: 2rem;
    background-color: var(--white-color);
    padding: 2rem; /* Tăng padding */
    border-radius: 12px; /* Bo tròn nhiều hơn */
    margin-bottom: 1.5rem;
    box-shadow: var(--box-shadow);
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.guide-sub-step:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.sub-step-image {
    flex-shrink: 0;
    /* Thay đổi: Chiều rộng 100% để ảnh to hơn */
    width: 100%;
    display: flex;
    justify-content: center; /* Căn giữa các ảnh nếu có nhiều ảnh */
    gap: 1rem;
    align-items: center;
}

.sub-step-image img {
    width: 100%;
    height: auto;
    max-width: 500px; /* Giới hạn chiều rộng tối đa của ảnh đơn */
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.sub-step-image.multiple-images img {
    /* Thay đổi: Mỗi ảnh chiếm gần 50% để hiển thị lớn hơn */
    width: calc(50% - 0.5rem); 
}

.sub-step-content p {
    font-size: 1rem;
    color: var(--text-color);
    line-height: 1.7;
}

/* Điều chỉnh kích thước riêng cho ảnh mã QR trong hướng dẫn Chatbot */
.guide-sub-step.chatbot-step-1 .sub-step-image img {
    max-width: 250px; /* Giới hạn chiều rộng tối đa cho ảnh QR */
}

/* Căn giữa nội dung (bao gồm cả nút) trong bước 1 của hướng dẫn Chatbot */
.guide-sub-step.chatbot-step-1 .sub-step-content {
    width: 100%; /* Đảm bảo container chiếm toàn bộ chiều rộng */
    text-align: center; /* Căn giữa văn bản và nút */
}

/* --- Lightbox for Images --- */
.lightbox-trigger {
    cursor: zoom-in; /* Đổi con trỏ chuột để báo hiệu có thể click */
    transition: opacity 0.2s ease;
}

.lightbox-trigger:hover {
    opacity: 0.8; /* Làm mờ nhẹ ảnh khi di chuột qua */
}

.lightbox-overlay {
    position: fixed; /* Phủ lên toàn bộ trang */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Nền đen mờ */
    z-index: 1000; /* Luôn nằm trên cùng */
    display: none; /* Mặc định ẩn đi */
    justify-content: center;
    align-items: center;
    padding: 2rem;
    backdrop-filter: blur(5px); /* Hiệu ứng kính mờ cho nền phía sau */
}

.lightbox-image {
    max-width: 90%;
    max-height: 90vh; /* Chiều cao tối đa bằng 90% chiều cao màn hình */
    object-fit: contain; /* Đảm bảo ảnh không bị méo */
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: #ccc;
}

/* --- About & Contact Page --- */
.about-grid {
    display: grid;
    /* Chuyển về bố cục 1 cột để nội dung rộng hơn */
    grid-template-columns: 1fr;
    gap: 3rem; /* Thêm khoảng cách giữa các khối nội dung chính */
    align-items: start;
}

.info-card {
    background-color: var(--white-color); /* Chuyển sang nền trắng để nổi bật hơn */
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem; /* Thêm khoảng cách nếu các card xếp chồng lên nhau trên màn hình nhỏ */
    border-left: 4px solid var(--primary-color); /* Thêm viền trái để tạo điểm nhấn */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Thêm transition */
}

.info-card h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.info-card h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background-color: var(--secondary-color);
}

.about-content h4 {
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.team-subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    border-top: 1px solid #eee;
    padding-top: 2rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem; /* Tăng khoảng cách giữa các thẻ */
}

.team-member-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center; 
    background-color: var(--light-color);
    padding: 2rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12); /* Tăng độ sâu của bóng đổ */
}

.member-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 4px solid var(--white-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: border-color 0.3s ease; /* Thêm hiệu ứng chuyển đổi cho viền */
}

/* Thêm hiệu ứng cho ảnh khi hover vào thẻ thành viên */
.team-member-card:hover .member-photo {
    border-color: var(--secondary-color); /* Đổi màu viền ảnh khi hover */
}

.member-role {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Kiểu cho mã QR trên trang liên hệ */
.contact-qr-code {
    width: 180px;
    height: 180px;
    margin: 1.5rem 0;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
}

/* Kiểu cho Google Form được nhúng */
.google-form-iframe {
    margin-top: 1.5rem;
    border-radius: var(--border-radius);
    border: none; /* Bỏ viền của iframe */
    width: 100%;
    height: 1200px; /* Thêm chiều cao cố định cho iframe */
}

/* --- Footer --- */
.site-footer {
    background-color: var(--dark-color);
    color: var(--white-color);
    text-align: center;
    padding: 2rem 0;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }
    .about-grid {
        grid-template-columns: 1fr;
        gap: 0; /* Bỏ khoảng cách gap khi chỉ có 1 cột */
    }

    .guide-sub-step {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* --- Keyframes cho animation của tiêu đề --- */
@keyframes gradient-shine {
    0% {
        background-position: 200% center;
    }
    100% {
        background-position: -200% center;
    }
}