
.lichsuhero {
    height: 93vh; 
    position: relative; 
    display: flex;
    align-items: flex-end; 
    padding: 0; 
    justify-content: center; 
    width: 100%;
}

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

.lichsuhero-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;
}

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

.lichsuhero-text .sub-title {
    font-size: 11px;
    word-spacing: 5px;
    font-weight: 300;
    letter-spacing: 1px;
    margin-bottom: 30px;
}

.lichsuhero-text { 
    color: #fff; 
    width: 100%;
    max-width: var(--container-max); 
    margin: 0 auto; 
    padding: 0 var(--side-padding); 
    margin-bottom: 48px;
    z-index: 2;
    text-align: left; 
}
.lichsuhero-text h1 { font-size: 60px; line-height: 1.1; margin-bottom: 40px; font-weight: 400; }
.lichsuhero-text p { letter-spacing: 0px; font-size: 15px; margin-bottom: 35px; }

.mobile-only { 
    display: none !important; 
}


.mobile-menu-btn, .mobile-overlay { display: none; }



@media (max-width: 1024px) {
    .lichsuhero {
        height: auto !important; 
        min-height: 120vw !important; 
        background-size: cover !important;
        background-position: center !important;
        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;
    }

    .lichsuhero-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 */
    }

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

    .lichsuhero-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) {
    .lichsuhero {
        min-height: 56vw !important; /* Tỉ lệ ngang cho Tablet [cite: 2026-02-07] */
    }
}







/* ==========================================================================
   SECTION: PHILOSOPHY (TRIẾT LÝ) - COMPONENT TỔNG
   ========================================================================== */

.philosophy-section {
    padding: var(--section-gap) 0;
}

.philo-label .section-label {
    font-size: 13px;
    word-spacing: 5px;
    letter-spacing: 1px;
    color: #2b2929;
    font-weight: 300;
    width: 100%;
    text-transform: uppercase;
}

.btn-casa {
    font-family: var(--special-font);
    display: inline-block;
    padding: 16px 45px;
    background-color: var(--color-bg-dark);
    color: var(--white);     
    border: 2px solid var(--color-dark);
    border-radius: 100px;
    text-decoration: none;
    letter-spacing: -0.02em;
    font-size: 17px;
    font-weight: 100;
    transition: 0.3s ease;
    cursor: pointer;
}

.btn-casa:hover {
    background-color: transparent;   
    color: var(--color-dark);           
}

/* --------------------------------------------------------------------------
   1. DESKTOP (1440px trở lên)
   -------------------------------------------------------------------------- */
@media screen and (min-width: 1440px) {
    .philo-label { 
        font-size: 13px;
        text-transform: uppercase;
        font-weight: 300;
        letter-spacing: 1px;
        color: #2b2929;
        font-weight: 300;
        margin-bottom: 30px;
    }
    
    .philo-title {
        font-size: clamp(38px, 5vw, 50px);
        line-height: 1.4;
        font-weight: 400;
        margin-bottom: 30px;
        max-width: 1100px;
    }

    .philo-description p {
        font-size: 13px;
        line-height: 1.6;
        margin-bottom: 25px;
        max-width: 670px;
        color: var(--color-black);
    }

    .btn-casa {
        margin-top: 5px;
    }
}

/* --------------------------------------------------------------------------
   2. TABLET LỚN (820px - 1439px) - iPad Pro, Air...
   -------------------------------------------------------------------------- */
@media screen and (min-width: 820px) and (max-width: 1439px) {
    .philosophy-section { padding: 60px 0 !important; }

    .philosophy-section .casa-container {
        padding-left: 20px !important;
        padding-right: 20px !important;
        max-width: 100% !important;
    }

    .philo-label { 
        margin-bottom: 30px; 
        font-size: 11px;
        letter-spacing: 1px;
        word-spacing: 5px;
        font-weight: 200;
        text-transform: uppercase;
        color: var(--color-text-muted);
    }

    .philo-title {
        font-size: 40px !important;
        line-height: 1;
        margin-bottom: 30px;
        max-width: 100%;
    }

    .philo-description p {
        font-size: 12px;
        max-width: 670px; /* Giữ độ rộng vừa phải cho Tablet lớn */
        margin-bottom: 30px;
    }

    .btn-casa { width: auto; }
}

/* --------------------------------------------------------------------------
   3. TABLET NHỎ (768px - 819px) - iPad Mini...
   -------------------------------------------------------------------------- */
@media screen and (min-width: 768px) and (max-width: 819px) {
    .philosophy-section { padding: 60px 0 !important; }

    .philosophy-section .casa-container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .philo-label { margin-bottom: 25px; 
        font-size: 11px; 
        word-spacing: 5px; 
        font-weight: 200 !important; 
        letter-spacing: 1px; 
        color: #2b2929; 
        text-transform: uppercase;}

    .philo-title {
        font-size: 40px !important;
        line-height: 1.2;
        margin-bottom: 30px;
    }

    .philo-description p {
        font-size: 12px;
        line-height: 1.6;
        margin-bottom: 25px;
        max-width: 600px;
    }

    .btn-casa { 
        width: auto; 
        padding: 15px 40px;
    }
}

/* --------------------------------------------------------------------------
   4. MOBILE (Dưới 768px)
   -------------------------------------------------------------------------- */
@media screen and (max-width: 767px) {
    .philosophy-section { padding: 50px 0 !important; }

    .philosophy-section .casa-container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .philo-label { margin-bottom: 25px; font-size: 11px; word-spacing: 5px; font-weight: 200 !important; letter-spacing: 1px; color: #2b2929; text-transform: uppercase;}

    .philo-title {
        font-size: 28px !important; /* Thu nhỏ tiêu đề cho mobile hít lề đẹp */
        line-height: 1.2;
        margin-bottom: 20px;
    }

    .philo-description p {
        font-size: 12px;
        font-weight: 400;
        word-spacing: 1px;
        line-height: 1.6;
        margin-bottom: 25px;
        color: var(--black);
    }

    .btn-casa {
        width: 100%; /* Dàn hàng ngang cho dễ click trên mobile */
        text-align: center;
        padding: 14px 0;
    }
}











/* --------------------------------------------------------------------------
   1. CORE & DESKTOP (GỐC 100% - KHÔNG BỌC MEDIA QUERY)
   -------------------------------------------------------------------------- */
/* --- SECTION JOURNEY --- */
.journey-section {
    padding: 0;
    background-color: var(--color-white);
}

.journey-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 13px;
}

.journey-header .section-label {
    font-size: 13px;
    letter-spacing: 1px;
    word-spacing: 5px;
    color: #2b2929;
    font-weight: 300;
    display: inline-block;
    width: 100%;
    text-transform: uppercase;
}

.journey-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;
}

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

.ctrl-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
    pointer-events: none;
}

.journey-slider {
    display: flex;
    gap: 12px;
    overflow-x: auto; 
    scroll-snap-type: x proximity; 
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

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

.journey-item {
    flex: 0 0 calc((100% - 24px) / 3) !important; 
    min-width: calc((100% - 24px) / 3) !important;
    scroll-snap-align: start;
}

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

.journey-progress-container {
    width: 100%;
    height: 1px;
    transform: scaleY(0.8);
    background-color:var(--color-bar);
    margin-top: 30px;
    position: relative;
    overflow: hidden;
}

.journey-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%; 
    background-color: var(--black); 
    transition: width 0.2s ease-out; 
}


/* --- TABLET LỚN (820px - 1439px): FIX VỠ TRANG & LIỆT PROGRESS --- */
@media screen and (min-width: 820px) and (max-width: 1439px) {
    .journey-section .casa-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 100% !important;
    }
    .journey-section { padding: 40px 0 !important; overflow: hidden; margin-top: -20px; }
    .journey-header { padding: 0 20px !important; margin-bottom: 20px !important; }
    .journey-controls { display: none !important; }

    .journey-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;
    }

    .journey-item {
        flex: 0 0 45% !important; /* Hiện khoảng 2.5 card */
        min-width: 45% !important;
        scroll-snap-align: start !important;
    }

    /* FIX PROGRESS BAR CHẠY HẾT: Đẩy lề phải vào item cuối */
    .journey-item:last-child {
        margin-right: 20px !important;
    }

    .journey-item img { aspect-ratio: 6/7 !important; margin-bottom: 5px !important; }
    .journey-progress-container { margin: 40px 20px 0 20px !important; width: calc(100% - 40px) !important; }
}



/* --- TABLET NHỎ (768px - 819px): FIX PROGRESS BAR CHẠY HẾT --- */
@media screen and (min-width: 768px) and (max-width: 819px) {
    .journey-section .casa-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 100% !important;
    }
    .journey-section { padding: 40px 0 !important; overflow: hidden; margin-top: -20px; }
    .journey-header { padding: 0 20px !important; margin-bottom: 20px !important; }
    .journey-controls { display: none !important; }

    .journey-slider {
        padding: 0 !important;
        padding-left: 20px !important;
        scroll-padding-left: 20px !important;
        gap: 10px !important;
        scroll-snap-type: x mandatory !important;
        display: flex !important;
        overflow-x: auto !important;
    }

    .journey-item {
        flex: 0 0 44% !important; /* Hiện khoảng 1.5 card */
        min-width: 44% !important;
        scroll-snap-align: start !important;
    }

    /* FIX PROGRESS BAR CHẠY HẾT: Đẩy lề phải vào item cuối */
    .journey-item:last-child {
        margin-right: 20px !important;
    }

    .journey-item img { aspect-ratio: 6/7 !important; margin-bottom: 15px !important; }
    .journey-progress-container { margin: 40px 20px 0 20px !important; width: calc(100% - 40px) !important; }
}



/* --------------------------------------------------------------------------
   4. MOBILE (Dưới 768px) - GỐC 100% CỦA MÀY
   -------------------------------------------------------------------------- */
@media screen and (max-width: 767px) {
    .journey-section .casa-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 100% !important;
    }

    .journey-section {
        padding: 40px 0 !important; 
        overflow: hidden; 
        margin-top: -20px;
    }

    .journey-header {
        padding: 0 20px !important;
        margin-bottom: 20px !important;
    }

    .journey-header .section-label {
        font-size: 11px; 
        font-weight: 300;
        color: var(--color-bg-dark); 
    }

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

    .journey-slider {
        padding: 0 20px !important; 
        scroll-padding-left: 20px !important; 
        gap: 9px !important; 
        scroll-snap-type: x mandatory !important; 
        display: flex !important;
        overflow-x: auto !important;
        margin-right: 0;
    }

    .journey-item {
        /* GỐC CỦA MOBILE */
        flex: 0 0 85% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        scroll-snap-align: start !important; 
        scroll-snap-stop: always !important;
    }

    .journey-item:last-child {
        margin-right: 0 !important;
    }

    .journey-item img {
        aspect-ratio: 6/7 !important; 
        margin-bottom: 15px !important;
    }

    .journey-progress-container {
        margin: 20px 0 0 0 !important;
        width: 100%;
        transform: scaleY(0.5); 
        transform-origin: center;
    }
}







/* ==========================================================================
   SECTION NHIEM VU - CHUẨN DANNA (KHÔNG CHẾ CHÁO)
   ========================================================================== */

/* 1. LAYOUT GỐC / DESKTOP (Mặc định cho mọi màn hình lớn) */
.nhiemvu-section {
    padding: var(--section-gap) 0;
    background-color: var(--color-white);
}

.nhiemvu-intro {
    max-width: var(--container-max);
    margin-bottom: 80px;
}

.nhiemvu-intro .section-label {
    font-size: 13px;
    word-spacing: 5px;
    letter-spacing: 1px;
    color: #2b2929;
    font-weight: 200;
    margin-bottom: 30px; 
    display: inline-block;
    width: 100%;
    text-transform: uppercase; /* GIỮ NGUYÊN UPPERCASE THEO Ý MÀY */
}

.nhiemvu-main-text {
    font-size: 30px;
    line-height: 1.5; /* KHOẢNG CÁCH DÒNG GỐC 1.5 */
    font-weight: 400;
    color: var(--color-dark);
    letter-spacing: -0.01em;
}

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

.nhiemvu-item {
    display: flex;
    flex-direction: column;
}

.nhiemvu-img {
    width: 100%;
    aspect-ratio: 7 / 8; 
    margin-bottom: 25px;
    overflow: hidden;
    background-color: #f9f9f9;
}

.nhiemvu-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.nhiemvu-title {
    font-size: 33px;
    font-weight: 500;
    margin-bottom: 18px;
    color: var(--black);
}

.nhiemvu-desc {
    font-size: 13px;
    line-height: 1.6; /* KHOẢNG CÁCH DÒNG DESC 1.6 */
    color: var(--black);
}

/* 2. RESPONSIVE CHO TABLET (1439px trở xuống) */
@media screen and (max-width: 1439px) {
    .nhiemvu-section {
        padding: 20px 0 !important; 
        margin-bottom: 40px;
    }

    .nhiemvu-section .casa-container {
        padding-left: 20px !important; /* Lề 2 bên 20px [cite: 2026-02-07] */
        padding-right: 20px !important;
        max-width: 100% !important;
    }

    .nhiemvu-intro { margin-bottom: 40px; }
    
    .nhiemvu-intro .section-label {
        display: block;
        word-spacing: 5px;
        font-size: 11px;
        font-weight: 200;
        color: #2b2929;
        letter-spacing: 1px;
        text-transform: uppercase;
        margin-bottom: 25px;
    }    
    
    .nhiemvu-main-text {
        font-size: 33px !important; 
        word-spacing: 1px;
        color: var(--black);
        line-height: 1.3 !important; 
        padding-bottom: 20px;
    }

    /* ĐƯA VỀ NGANG VÀ THÊM THUỘC TÍNH LƯỚT (KHÔNG PROGRESS BAR) */
    .nhiemvu-grid {
        display: flex !important;
        overflow-x: auto !important;
        gap: 15px !important;
        padding-bottom: 10px;
        scrollbar-width: none; /* ẨN TRÊN FIREFOX */
        -ms-overflow-style: none; /* ẨN TRÊN IE/EDGE */
    }

    .nhiemvu-grid::-webkit-scrollbar {
        display: none !important; /* ẨN TRÊN CHROME/SAFARI */
    }

    .nhiemvu-item {
        flex: 0 0 calc((100% - 30px) / 3) !important; 
        min-width: 300px;
    }

    .nhiemvu-img {
        aspect-ratio: 7 / 8 !important;
        margin-bottom: 20px !important;
    }

    .nhiemvu-title {
        font-size: 28px !important;
        margin-bottom: 12px !important;
    }
}

/* 3. ĐIỀU CHỈNH RIÊNG CHO TABLET NHỎ (Dưới 820px) */
@media screen and (max-width: 819px) {
    .nhiemvu-item {
        flex: 0 0 45% !important; /* Hiện 2 cột rưỡi để biết đường lướt */
    }
    
    .nhiemvu-main-text {
        font-size: 33px !important; 
        color: var(--black);
        line-height: 1.3 !important; 
        padding-bottom: 20px;
    }

    .nhiemvu-title {
        font-size: 25px !important; 
        line-height: 1.4 !important; 
        color: var(--color-h3) !important; 
        margin-bottom: 25px !important; 
        font-weight: 500;
    }

    .nhiemvu-desc {
        font-size: 12px !important; 
        line-height: 1.6 !important; 
        color: var(--black) !important; 
        margin-bottom: 20px;
    }   

}

/* 4. MOBILE (< 767px) - GIỮ NGUYÊN DỌC NHƯ MÀY MUỐN */
@media screen and (max-width: 767px) {
    .nhiemvu-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }

    .nhiemvu-item {
        width: 100% !important;
        flex: none !important;
    }

    .nhiemvu-img {
        aspect-ratio: 1 / 1 !important;
    }


    .nhiemvu-intro { 
        margin-top: -10px;
        margin-bottom: 40px; 
    } 

    .nhiemvu-main-text {
        font-size: 33px !important; 
        color: var(--black);
        line-height: 1.3 !important; 
        padding-bottom: 20px;
    }

    .nhiemvu-title {
        font-size: 25px !important; 
        line-height: 1.4 !important; 
        color: var(--color-h3) !important; 
        margin-bottom: 25px !important; 
        font-weight: 500;
    }

    .nhiemvu-desc {
        font-size: 12px !important; 
        line-height: 1.6 !important; 
        color: var(--black) !important; 
        margin-bottom: 20px;
    }
}






/* --- SECTION LICHSUPROCESS (FULL SCREEN) --- */
.lichsuprocess-section {
    position: relative;
    width: 100%;
    height: 100vh; /* Cao bằng màn hình */
    min-height: 750px;
    background-image: url('../image/images/indexheroimage.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Hiệu ứng đứng hình khi cuộn (Parallax) */
    background-attachment: fixed; 
}

/* Lớp phủ để chữ trắng nổi bật trên mọi loại ảnh */
.lichsuprocess-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to top, 
        rgba(0, 0, 0, 0.4) 0%, 
        rgba(0, 0, 0, 0.2) 100%
    );
    
    /* [QUAN TRỌNG] Dùng flex để gom cái nội dung vào giữa khi zoom out */
    display: flex;
    justify-content: center; 
    align-items: flex-end; 
    padding: 0; /* Bỏ padding trực tiếp để container lo */
}

.lichsuprocess-content {
    color: #ffffff;
    width: 100% !important;
    max-width: var(--container-max) !important; 
    margin: 0 auto !important;
    padding: 0 var(--side-padding) 80px var(--side-padding) !important; /* Lề 55px và đáy 80px */
    box-sizing: border-box;
    text-align: left; /* Luôn canh trái trong cái lồng 1650px */
}

.lichsuprocess-title {
    font-size: clamp(40px, 5vw, 60px); /* Tự co giãn font theo màn hình */
    font-weight: 500;
    margin-bottom: 18px;
    letter-spacing: -0.02em;
}

.lichsuprocess-description {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 30px;
    opacity: 0.9;
    max-width: 800px;
}

.lichsuprocess-btn {
    font-family: var(--special-font);
    display: inline-block;
    padding: 14px 35px;
    background-color: #ffffff;
    color: var(--black);
    text-decoration: none;
    border: 2px solid var(--white); /* Viền cùng màu với nền */
    border-radius: 100px;
    font-size: 17px;
    font-weight: 100;
    text-transform: none;
    letter-spacing: -0.02em;    
}

.lichsuprocess-btn:hover {
    background-color: transparent;   
    color: var(--white);           
}

/* --- RESPONSIVE LICHSUPROCESS --- */
@media (max-width: 1024px) {
    .lichsuprocess-section {
        /* Bỏ chiều cao cố định, dùng tỉ lệ khung hình để co giãn thông minh */
        height: auto !important; 
        min-height: unset !important;
        aspect-ratio: 4 / 5; /* Tỉ lệ dọc hiện đại, giống ảnh QUOC mày gửi */
        background-attachment: scroll; /* Fix lỗi lag trên mobile */
    }

    .lichsuprocess-overlay {
        display: flex;
        align-items: flex-end; 
        justify-content: center; 
        text-align: center;
        
        
        padding: 60px 20px 40px 20px !important;
        
        background: rgba(0,0,0,0.3); 
    }

    .lichsuprocess-content {
        max-width: 100%;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center; 
        text-align: center !important;
        padding: 0 !important;
        /* CHIÊU CUỐI: Dùng margin-bottom âm để ép cụm này xuống sát mép dưới hơn nữa */
    }


    .lichsuprocess-title {
        font-size: 28px !important;
        line-height: 1.2;
        margin-bottom: 20px;
        font-weight: 400;
        width: 100%; /* Đảm bảo text có không gian để căn giữa */
    }

    .lichsuprocess-description {
        font-size: 12px;
        letter-spacing: 0px;
        margin-bottom: 25px;
        
        /* [QUAN TRỌNG] Cho phép chữ dãn ra tối đa không gian cho phép */
        max-width: 100% !important; 
        width: 100% !important;
        
        /* Giữ lề lối */
        margin-left: auto;
        margin-right: auto;
    }
    
    .lichsuprocess-btn {
        padding: 13px 30px;
        font-size: 17px;
        font-weight: 100;
        letter-spacing: -0.02em;
        width: fit-content !important; 
        display: inline-block;
        margin: 0 auto;
        margin-bottom: 0 !important;
    }
}

/* TABLET: Dài ngang ra tối ưu như Desktop (như hình iPad Mini mày gửi) */
@media (min-width: 768px) and (max-width: 1024px) {
    .lichsuprocess-section {
        aspect-ratio: 16 / 9; /* Ép về tỉ lệ màn hình ngang */
    }
    
    .lichsuprocess-title {
        font-size: 45px !important;
    }
}