/*Historyhero*/
.quytrinhhero {
    height: 93vh; 
    position: relative; 
    display: flex;
    align-items: flex-end; 
    /* Thay đổi quan trọng: Bỏ padding cố định, dùng flex để căn giữa khối nội dung */
    padding: 0; 
    justify-content: flex-start; 
    width: 100%;
}

.quytrinhhero-bg { position: absolute; inset: 0; z-index: -1; }

.quytrinhhero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 2; /* Nằm trên ảnh */
    pointer-events: none;
}

.quytrinhhero-bg img { width: 100%; height: 100%; object-fit: cover; }

.quytrinhhero-text { 
    color: #fff; 
    width: 100%;
    max-width: var(--container-max); /* Khóa chặt ở 1650px */
    margin: 0 auto; /* Ép vào giữa màn hình */
    padding: 0 var(--side-padding); /* Trả lại đúng 55px padding để chữ đứng đúng vị trí cũ */
    margin-bottom: 48px;
    z-index: 2;
    text-align: left; /* Đảm bảo chữ vẫn canh trái bên trong cái lồng 1650px */
}
.quytrinhhero-text h1 { font-size: 60px; line-height: 1.1; margin-bottom: 40px; font-weight: 400; }
.quytrinhhero-text p { letter-spacing: 0px; font-size: 15px; margin-bottom: 35px; }




@media (max-width: 1024px) {
    .quytrinhhero {
        /* 1. Xóa bỏ chiều cao 75vh cũ */
        height: auto !important; 
        
        /* 2. Dùng min-height theo % chiều ngang màn hình (tương đương tỉ lệ 4:5) */
        /* Cách này giúp nó co giãn thông minh mà không bị ép cứng như aspect-ratio */
        min-height: 120vw !important; 
        
        /* 3. Đảm bảo ảnh nền luôn lấp đầy cái khung mới này */
        background-size: cover !important;
        background-position: center !important;

        /* GIỮ NGUYÊN TOÀN BỘ CẤU TRÚC CỦA MÀY */
        display: flex;
        flex-direction: column;
        justify-content: flex-end; 
        align-items: center;    
        text-align: center;
        padding: 0 20px;
        padding-bottom: 20px !important; 
        padding-left: 20px !important;
        padding-right: 20px !important;
        border-top: 1px solid #ffffff;
    }

    .quytrinhhero-text {
        padding: 0 !important; 
        margin: 0 auto !important;
        max-width: 100% !important; 
        width: 100% !important;
        
        /* Đảm bảo căn giữa tuyệt đối */
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center !important;
        margin-bottom: 20px !important; /* Khoảng cách so với đáy section 20px */
    }


    .quytrinhhero-text h1 {
        font-size: 28px; 
        font-weight: 500;
        margin-bottom: 20px;
        line-height: 1.2;
    }

    .quytrinhhero-text p {
        font-size: 12px;
        letter-spacing: 0px;
        margin-bottom: 0px;
    }
}


/* TABLET: Dàn ngang ra tối ưu */
@media (min-width: 768px) and (max-width: 1024px) {
    .quytrinhhero {
        min-height: 56vw !important; /* Tỉ lệ ngang cho Tablet [cite: 2026-02-07] */
    }
}





/* ================================================
MAIN' PROGRESS - ALL BODY SECTIONS
================================================ */

.step1-section {
    padding: var(--section-gap) 0; /* Lề trên dưới hít theo root */
    margin-bottom: -40px;
}

/* Nhãn nằm riêng một dòng */
.step1-label {
    margin-bottom: 25px; /* Khoảng cách từ nhãn xuống tiêu đề */
}

.step1-label .section-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
}

/* Tiêu đề lớn hít lề trái */
.step1-title {
    font-size: clamp(38px, 5vw, 50px);
    line-height: 1.1;
    font-weight: 500;
    margin-bottom: 30px;
    max-width: 1100px; /* Vẫn giữ cái này để dòng chữ không bị dài quá khổ */
}

/* Đoạn mô tả và nút bấm */
.step1-description p {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 670px;
    color: var(--color-black);
}






/*Step1slider*/
.step1album-section {
    padding-top: 0px;
    background-color: var(--color-white);
}

.step1album-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 13px;
}

/* Label "Hành trình" */
.step1album-header .section-label {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 200;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
}

/* Cụm 2 nút điều hướng */
.step1album-controls {
    display: flex;
    gap: 12px;
}

.ctrl-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1px solid var(--black); /* Màu dark từ footer nhưng nhạt đi */
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-dark); /* Màu hắc ín của mày */
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 0;
}

/* Hover nút: Đảo màu đúng như mày muốn */
.ctrl-btn:hover {
    background-color: var(--color-dark);
    color: #ffffff;
}

.ctrl-btn svg {
    width: 15px;
    height: 15px;
}

.ctrl-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
    pointer-events: none; /* Ngăn không cho click luôn */
}

/* --- KHUNG SLIDER --- */
.step1album-slider {
    display: flex;
    /* Khoảng cách cố định giữa các hình [cite: 2026-02-11] */
    gap: 20px; 
    overflow-x: auto; 
    /* Chuyển sang mandatory để ép hít mép, không cho phép lẹm pixel [cite: 2026-02-11] */
    scroll-snap-type: x mandatory; 
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.step1album-slider::-webkit-scrollbar {
    display: none;
}

.step1album-item {
    box-sizing: border-box; 
    /* Dùng flex-basis thay vì calc phức tạp để trình duyệt tự chia không gian */
    flex: 0 0 calc(33.333% - 13.333px); /* (100% / 3) - (20px * 2 / 3) cho gap 20px */
    scroll-snap-align: start;
}

.step1album-item img {
    width: 100%;
    aspect-ratio: 7/8; 
    object-fit: cover;
    margin-bottom: 15px;
    display: block;
}

.step1album-progress-container {
    width: 100%;
    height: 1px;
    transform: scaleY(0.8);
    background-color:var(--color-bar); /* Nền thanh mảnh, nhạt */
    margin-top: 30px;
    position: relative;
    overflow: hidden;
}

.step1album-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%; /* Bắt đầu từ 0 */
    background-color: var(--black); 
    transition: width 0.2s ease-out; 
}




/* ==========================================================================
   1. BASE / DESKTOP (Min 1025px) 
   ========================================================================== */
.step1-section {
    padding: var(--section-gap) 0; /* Lề trên dưới hít theo root */
    margin-bottom: -40px;
}
.step1-label { margin-bottom: 25px; }
.step1-label .section-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-text-muted); }
.step1-title { font-size: clamp(38px, 5vw, 50px); line-height: 1.1; font-weight: 500; margin-bottom: 30px; max-width: 1100px; }
.step1-description p { font-size: 13px; line-height: 1.6; margin-bottom: 30px; max-width: 670px; color: var(--color-black); }

.step1album-section { padding-top: 0px; background-color: var(--color-white); }
.step1album-header { display: flex; justify-content: flex-end; align-items: center; margin-bottom: 13px; }
.step1album-header .section-label { font-size: 12px; text-transform: uppercase; font-weight: 200; letter-spacing: 0.1em; color: var(--color-text-muted); }
.step1album-controls { display: flex; gap: 12px; }
.ctrl-btn { width: 35px; height: 35px; border-radius: 50%; border: 1px solid var(--black); background-color: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--color-dark); transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); padding: 0; }
.ctrl-btn:hover { background-color: var(--color-dark); color: #ffffff; }

.step1album-slider { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.step1album-slider::-webkit-scrollbar { display: none; }
.step1album-item { flex: 0 0 calc(33.333% - 13.333px); scroll-snap-align: start; } /* 3 cột Desktop */
.step1album-item img { width: 100%; aspect-ratio: 7/8; object-fit: cover; margin-bottom: 15px; display: block; }

.step1album-progress-container { width: 100%; height: 1px; transform: scaleY(0.8); background-color: var(--color-bar); margin-top: 35px; position: relative; overflow: hidden; }
.step1album-progress-bar { position: absolute; top: 0; left: 0; height: 100%; width: 0%; background-color: var(--black); transition: width 0.2s ease-out; }


/* ==========================================================================
   2. TABLET LARGE (992px - 1024px) - iPad Pro
   Ghi đè để Card không bị phình to và lề hít lề Casa
   ========================================================================== */
@media (min-width: 992px) and (max-width: 1024px) {
    .step1-section {
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-top: 60px;
    }

    /* 2. ÉP CONTAINER HÍT ĐÚNG 20PX [cite: 2026-02-07] */
    .step1-section .casa-container {
        padding-left: 20px !important; 
        padding-right: 20px !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .step1album-header { 
        padding: 0 !important; /* Hít theo container cha */
        margin-bottom: 15px !important;
    }

    .step1album-controls { 
        display: none !important; /* Ẩn nút theo lệnh của mày */
    }

    .step1album-section .casa-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .step1album-slider { 
        padding: 0 !important;
        padding-left: 20px !important; /* Lề trái 20px chuẩn */
        scroll-padding-left: 20px !important;
        gap: 20px !important;
        scroll-snap-type: x mandatory !important;
        display: flex !important;
        overflow-x: auto !important;
    }
    
    /* 4. ITEM & RATIO: HIỆN 2.5 CARD ĐỂ LỘ ĐUÔI ẢNH [cite: 2026-01-01] */
    .step1album-item { 
        flex: 0 0 45% !important; /* Hiện khoảng 2.5 card */
        min-width: 45% !important;
        scroll-snap-align: start !important;
    }

    .step1album-item img { 
        aspect-ratio: 6/7 !important; /* Đồng bộ ratio với iPad Mini cho đẹp */
        margin-bottom: 15px !important;
        width: 100% !important;
    }

    /* 5. PROGRESS BAR: HÍT LỀ 20PX [cite: 2026-02-07] */
    .step1album-progress-container {
        margin: 30px 20px 0 20px !important; 
        width: calc(100% - 40px) !important;
    }
}



/* ==========================================================================
   3. TABLET SMALL (768px - 991px) - iPad Mini/Air
   Xử lý triệt để iPad Mini card to tổ chảng. Tao chia 2 cột.
   ========================================================================== */
@media (min-width: 768px) and (max-width: 991px) {
    /* 1. TRIỆT TIÊU LỀ TO: ÉP SECTION & CONTAINER VỀ 0 TRƯỚC [cite: 2026-02-07] */
    .step1-section {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .step1-section .casa-container {
        padding-left: 20px !important; /* Chốt chặn lề 20px duy nhất ở đây */
        padding-right: 20px !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* 2. HEADER & TITLE */
    .step1album-header { 
        padding: 0 !important; /* Đã ăn theo padding của casa-container ở trên */
        margin-bottom: 15px !important;
    }

    .step1album-controls { 
        display: none !important; 
    }

    .step1-title { 
        font-size: 32px !important; 
        margin-left: 0 !important;
    }
    
    /* 3. SLIDER: PHẢI TRÀN LỀ ĐỂ VUỐT MỚI SƯỚNG [cite: 2026-01-01] */
    .step1album-section .casa-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .step1album-slider { 
        padding: 0 20px !important; /* Tạo lề ảo bên trong slider */
        scroll-padding: 0 20px !important;
        gap: 10px !important; /* Đúng 10px mày muốn */
        display: flex !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
    }
    
    /* 4. ITEM & RATIO: GIỮ NGUYÊN THÔNG SỐ MÀY VỪA CHỈNH */
    .step1album-item { 
        flex: 0 0 44% !important; 
        min-width: 44% !important;
        scroll-snap-align: start !important;
    }

    .step1album-item img { 
        aspect-ratio: 6/7 !important; 
        margin-bottom: 12px !important;
        width: 100% !important;
    }

    /* 5. PROGRESS BAR: ÉP HÍT LỀ 20PX [cite: 2026-02-07] */
    .step1album-progress-container {
        margin: 25px 20px 0 20px !important; 
        width: calc(100% - 40px) !important;
    }
}


/* ==========================================================================
   4. MOBILE LAYER (Max 767px) - iPhone SE...
   Bê nguyên 100% các thông số gốc của mày, kể cả cái calc phức tạp.
   ========================================================================== */
@media (max-width: 767px) {
    .step1-section .casa-container {
        padding-left: 20px !important;
        padding-right: 20px !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        box-sizing: border-box !important;
    }
    .step1-title, .step1-description p { max-width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; }
    .step1-description p { font-size: 12px !important; line-height: 1.6; }
    .step1-label { padding-left: 0 !important; margin-left: 0 !important; }

    .step1album-section { padding: 0 !important; overflow: hidden; }
    .step1album-section .casa-container { padding-left: 0 !important; padding-right: 0 !important; max-width: 100% !important; }
    .step1album-header { padding: 0 20px !important; margin-bottom: 0px !important; }
    .step1album-controls { display: none; }  

    .step1album-slider {
        padding: 0 20px !important; 
        scroll-padding: 0 20px !important; 
        gap: 8px !important;
        scroll-snap-type: x mandatory !important;
        scroll-behavior: auto !important;
        display: flex !important;
        margin-right: 0 !important;
    }
    .step1album-item {
        flex: 0 0 85% !important; /* TRẢ LẠI 85% CHO MÀY, KHÔNG ĐỔI */
        min-width: 100% !important;
        max-width: 100% !important;
        scroll-snap-align: start !important;
        scroll-snap-stop: always !important;
    }
    .step1album-item img { aspect-ratio: 6/7 !important; margin-bottom: 15px !important; }
    .step1album-progress-container { margin: 20px 0 0 0 !important; width: 100%; }
}









/* --- FEATURES BAR --- */
.features-bar {
        margin-top: 100px;
        padding: 80px 0 !important; 
        background-color: #f6f6f6;
        border-top: 1px solid #f6f6f6;
        width: 100%;
        display: flex;
        justify-content: center; /* Đẩy cái container vào giữa */
    }


.features-bar .container {
        /* [MỎ NEO] Khóa chặt khung xương 1650px */
        width: 100% !important;
        max-width: var(--container-max) !important; 
        margin: 0 auto !important;
        /* Padding trái phải 55px để icon ngoài cùng không bị chạm mép 1650px */
        padding: 0 var(--side-padding) !important;
        box-sizing: border-box;
    }
    

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 cột đều nhau */
    gap: 40px;
    max-width: 100%; /* Giới hạn chiều rộng để không bị loãng */
    margin: 0 auto; /* Căn giữa màn hình */
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 10px;
}

.features-dots {
    display: none; /* Desktop vẫn ẩn */
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 20px 0; /* Tạo khoảng cách với vùng lướt */
    width: 100%;
    position: relative;
    z-index: 10;
}

/* Style cho Icon SVG */
.feature-icon {
    margin-bottom: 20px;
    color: #000;
}
.feature-icon svg {
    width: 32px;  /* Kích thước icon giống QUOC (nhỏ gọn) */
    height: 32px;
}

/* Tiêu đề mục */
.feature-item h3 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #000;
    margin: 0 0 10px 0;
    text-transform: none;
    letter-spacing: 1px;
}

/* Link bên dưới */
.feature-item a {
    font-family: 'Barlow', sans-serif; /* Font thường cho dễ đọc */
    font-size: 13px;
    color: #555;
    text-decoration: underline; /* Gạch chân giống QUOC */
    text-underline-offset: 4px; /* Gạch chân cách chữ ra một chút cho đẹp */
    transition: 0.3s;
}

.feature-item a:hover {
    color: #000; /* Rê chuột vào đen đậm lên */
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .features-bar {
        margin-top: 80px;
        padding: 40px 0; /* Giữ khoảng cách trên dưới vừa phải */
        overflow: hidden; /* Tránh bị tràn trang */
    }

    .features-grid {
        display: flex; /* Chuyển từ Grid sang Flex để các mục nằm trên 1 hàng ngang */
        overflow-x: auto; /* Cho phép cuộn ngang */
        scroll-snap-type: x mandatory; /* Hiệu ứng "hít" vào giữa mỗi mục khi lướt */
        gap: 0; /* Xóa khoảng cách grid */
        padding-bottom: 20px; /* Chừa chỗ cho thanh cuộn (nếu có) */
        
        /* Ẩn thanh cuộn (scrollbar) để nhìn cho sạch */
        -ms-overflow-style: none;  /* IE/Edge */
        scrollbar-width: none;  /* Firefox */
        -webkit-overflow-scrolling: touch; /* Giúp lướt trên iPhone mượt hơn */
    }

    /* Ẩn thanh cuộn trên Chrome/Safari */
    .features-grid::-webkit-scrollbar {
        display: none;
    }

    .feature-item {
        flex: 0 0 100%; /* Quan trọng: Mỗi mục chiếm đúng 100% chiều rộng màn hình */
        scroll-snap-align: center; 
        scroll-snap-stop: always;
        padding: 0 30px; 
        box-sizing: border-box;
    }

    .feature-icon svg {
        width: 28px; /* Cho icon nhỏ lại một chút trên mobile */
        height: 28px;
    }


    .features-dots {
        display: flex !important; 
    }

    .dot {
        width: 7px; /* To lên một chút cho dễ thấy */
        height: 7px;
        border-radius: 50%;
        background-color: #817c7c; /* Màu xám nhạt */
        display: block;
        transition: all 0.3s ease;
    }

    .dot.active {
        background-color: #000; /* Chấm đang chọn màu đen */
        transform: scale(1.3);
    }
}
