/* ==========================================
   HTCONS — GIAO DIỆN ĐIỆN THOẠI
   Chỉ áp dụng cho trang chủ có class htc-homepage
   ========================================== */

@media (max-width: 760px) {

    body.htc-homepage {
        margin: 0;
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    .htc-homepage *,
    .htc-homepage *::before,
    .htc-homepage *::after {
        box-sizing: border-box;
    }

    .htc-homepage .wrap {
        width: calc(100% - 40px);
        max-width: 100%;
        margin-right: auto;
        margin-left: auto;
    }

    .htc-homepage main {
        min-width: 0;
    }

        .htc-homepage main > section {
            scroll-margin-top: 84px;
        }

    /* ======================================
       HEADER VÀ MENU
       ====================================== */

    body.htc-homepage > header,
    body.htc-homepage > header.scrolled {
        position: sticky;
        top: 0;
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        height: 76px;
        min-height: 76px;
        padding: 8px 20px;
        gap: 16px;
        background: #ffffff;
        color: #173850;
        border-bottom: 1px solid #e2e9f0;
        box-shadow: 0 4px 18px rgba(12, 37, 65, 0.06);
    }

    .htc-homepage > header .brand,
    .htc-homepage > header.scrolled .brand {
        display: flex;
        align-items: center;
        width: 170px;
        height: 56px;
        max-width: calc(100% - 88px);
        margin: 0;
        padding: 0;
        flex: 0 1 170px;
        background: transparent;
        border-radius: 0;
        transform: none;
    }

        .htc-homepage > header .brand img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: contain;
            object-position: left center;
        }

    .htc-homepage #menuButton {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 68px;
        min-height: 42px;
        margin: 0;
        padding: 9px 12px;
        border: 1px solid #d5e1ed;
        border-radius: 8px;
        background: #f3f7fb;
        color: #174b79;
        font: inherit;
        font-size: 14px;
        font-weight: 700;
        line-height: 1.4;
    }

    .htc-homepage #navigation {
        position: absolute;
        top: 100%;
        right: 12px;
        left: 12px;
        z-index: 1001;
        display: none;
        width: auto;
        max-height: calc(100svh - 100px);
        margin: 0;
        padding: 12px;
        overflow-y: auto;
        border: 1px solid #e0e8f0;
        border-radius: 0 0 14px 14px;
        background: #ffffff;
        color: #173850;
        box-shadow: 0 18px 35px rgba(12, 37, 65, 0.14);
    }

        .htc-homepage #navigation.open {
            display: flex;
            flex-direction: column;
            align-items: stretch;
            gap: 4px;
        }

        .htc-homepage #navigation > a {
            display: block;
            width: 100%;
            margin: 0;
            padding: 12px 14px;
            border-radius: 8px;
            color: #173850;
            font-size: 15px;
            line-height: 1.5;
            text-decoration: none;
        }

            .htc-homepage #navigation > a.nav-cta {
                margin-top: 6px;
                background: #216cb1;
                color: #ffffff;
                text-align: center;
            }

    /* ======================================
       BANNER ĐẦU TRANG
       ====================================== */

    .htc-homepage #home.hero-carousel {
        height: calc(100svh - 76px);
        min-height: 540px;
        max-height: 850px;
    }

    .htc-homepage #home .hero-visual {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
    }

        .htc-homepage #home .hero-visual img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
        }

    .htc-homepage #home .hero-shade {
        background: linear-gradient( to top, rgba(5, 24, 39, 0.94) 0%, rgba(5, 24, 39, 0.76) 28%, rgba(5, 24, 39, 0.14) 68%, transparent 100% );
    }

    .htc-homepage #home .hero-grid {
        width: calc(100% - 40px);
        padding: 0 0 105px;
    }

    .htc-homepage #home .hero-copy {
        width: 100%;
        max-width: 500px;
    }

    .htc-homepage #home h1 {
        margin-bottom: 12px;
        font-size: clamp(27px, 7.2vw, 38px);
        line-height: 1.16;
        letter-spacing: -0.6px;
    }

    .htc-homepage #home .eyebrow {
        margin-bottom: 12px;
        font-size: 9px;
        line-height: 1.6;
        letter-spacing: 1.4px;
    }

    .htc-homepage #home .lead {
        margin-bottom: 18px;
        font-size: 13px;
        line-height: 1.65;
    }

    .htc-homepage #home .actions {
        gap: 9px;
    }

    .htc-homepage #home .button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 10px 13px;
        font-size: 11px;
    }

    .htc-homepage #home .hero-bottom {
        right: 20px;
        bottom: 24px;
        left: 20px;
        flex-direction: row;
        justify-content: center;
        gap: 8px;
    }

    .htc-homepage #home .hero-scroll {
        display: none;
    }

    .htc-homepage #home .carousel-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

        .htc-homepage #home .carousel-controls button {
            min-height: 38px;
        }

    .htc-homepage #home .hero-intro {
        padding: 28px;
    }

        .htc-homepage #home .hero-intro img {
            width: 100%;
            max-width: 420px;
            height: auto;
            max-height: 55svh;
            object-fit: contain;
        }

        .htc-homepage #home .hero-intro p {
            max-width: 320px;
            margin-top: 18px;
            font-size: 10px;
            line-height: 1.8;
            text-align: center;
        }

    .htc-homepage .service-strip .wrap {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 18px;
        padding: 16px 0;
        font-size: 11px;
    }

    /* ======================================
       NỀN CÁC PHẦN GIỚI THIỆU
       Đặt trực tiếp trên section để ổn định
       ====================================== */

    .htc-homepage #about.ht-about-background,
    .htc-homepage #services.ht-services,
    .htc-homepage #capabilities.ht-capabilities {
        position: relative;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 60px 0;
        color: #ffffff;
        background-color: #102e50;
        background-position: center top;
        background-size: cover;
        background-repeat: no-repeat;
        background-attachment: scroll;
    }

    .htc-homepage #about.ht-about-background {
        background-image: linear-gradient( 115deg, rgba(6, 26, 51, 0.88), rgba(12, 50, 91, 0.78) ), url("/assets/about-background.png?v=mobile1");
    }

    .htc-homepage #services.ht-services {
        background-image: linear-gradient( 115deg, rgba(3, 17, 43, 0.90), rgba(9, 45, 88, 0.78) ), url("/assets/services-background.png?v=mobile1");
    }

    .htc-homepage #capabilities.ht-capabilities {
        background-image: linear-gradient( 115deg, rgba(5, 24, 45, 0.90), rgba(13, 52, 89, 0.80) ), url("/assets/capabilities-background.png?v=mobile1");
    }

        .htc-homepage #about.ht-about-background::before,
        .htc-homepage #about.ht-about-background::after,
        .htc-homepage #services.ht-services::before,
        .htc-homepage #services.ht-services::after,
        .htc-homepage #capabilities.ht-capabilities::before,
        .htc-homepage #capabilities.ht-capabilities::after {
            content: none;
        }

    .htc-homepage #about h2,
    .htc-homepage #about h3,
    .htc-homepage #about h4,
    .htc-homepage #services h2,
    .htc-homepage #services h3,
    .htc-homepage #capabilities h2,
    .htc-homepage #capabilities h3,
    .htc-homepage #capabilities h4 {
        color: #ffffff;
    }

    .htc-homepage #about p,
    .htc-homepage #services p,
    .htc-homepage #capabilities p {
        color: #dce9f7;
        font-size: 15px;
        line-height: 1.8;
        overflow-wrap: anywhere;
    }

    .htc-homepage #about #ht-about-title,
    .htc-homepage #services #ht-services-title,
    .htc-homepage #capabilities #ht-capabilities-title,
    .htc-homepage #team #ht-team-title {
        margin: 0 0 20px;
        font-size: clamp(29px, 7.6vw, 40px);
        line-height: 1.2;
        letter-spacing: -0.7px;
    }

    .htc-homepage #about .ht-about-kicker,
    .htc-homepage #services .ht-services-label,
    .htc-homepage #capabilities .ht-cap-label {
        margin-bottom: 14px;
        color: #a9d7ff;
        font-size: 10px;
        font-weight: 700;
        line-height: 1.6;
        letter-spacing: 1.5px;
    }

    /* VỀ HTCONS */

    .htc-homepage #about .ht-about-intro {
        margin-bottom: 32px;
    }

    .htc-homepage #about .ht-about-history,
    .htc-homepage #about .ht-about-purpose {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .htc-homepage #about .ht-about-history {
        margin-bottom: 28px;
        padding: 24px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.22);
        border-bottom: 1px solid rgba(255, 255, 255, 0.22);
    }

        .htc-homepage #about .ht-about-history h3,
        .htc-homepage #about .ht-about-purpose h3,
        .htc-homepage #about .ht-about-values > h3 {
            margin: 0 0 14px;
            font-size: 25px;
            line-height: 1.3;
        }

    .htc-homepage #about .ht-about-dates {
        display: grid;
        gap: 14px;
        margin: 20px 0 0;
        padding: 0;
        list-style: none;
    }

        .htc-homepage #about .ht-about-dates li {
            display: grid;
            grid-template-columns: 58px minmax(0, 1fr);
            gap: 12px;
            font-size: 14px;
            line-height: 1.7;
        }

        .htc-homepage #about .ht-about-dates strong {
            color: #ffffff;
            font-size: 20px;
        }

    .htc-homepage #about .ht-about-values {
        margin-top: 36px;
    }

    .htc-homepage #about .ht-about-values-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .htc-homepage #about .ht-about-value,
    .htc-homepage #about .ht-about-purpose-item {
        min-width: 0;
        padding: 22px;
        border: 1px solid rgba(255, 255, 255, 0.20);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.06);
    }

    .htc-homepage #about .ht-about-index {
        display: block;
        margin-bottom: 12px;
        color: #a9d7ff;
        font-size: 11px;
    }

    .htc-homepage #about .ht-about-value h4 {
        margin: 0 0 8px;
        font-size: 20px;
    }

    .htc-homepage #about .ht-about-value p,
    .htc-homepage #about .ht-about-purpose-item p {
        margin-bottom: 0;
    }

    /* DỊCH VỤ */

    .htc-homepage #services .ht-services-heading,
    .htc-homepage #services .ht-services-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .htc-homepage #services .ht-services-heading {
        margin-bottom: 28px;
    }

    .htc-homepage #services .ht-service-card {
        min-width: 0;
        padding: 24px;
        border: 1px solid rgba(255, 255, 255, 0.22);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.06);
    }

    .htc-homepage #services .ht-service-number {
        display: block;
        margin-bottom: 16px;
        color: #a9d7ff;
        font-size: 10px;
        line-height: 1.6;
        letter-spacing: 1px;
    }

    .htc-homepage #services .ht-service-card h3 {
        margin: 0 0 16px;
        font-size: 25px;
        line-height: 1.25;
    }

    .htc-homepage #services .ht-service-detail {
        display: block;
        margin-top: 20px;
        color: #b8d7f5;
        font-size: 12px;
    }

    .htc-homepage #services .ht-services-footer {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-top: 28px;
    }

    /* NĂNG LỰC */

    .htc-homepage #capabilities .ht-cap-disciplines,
    .htc-homepage #capabilities .ht-cap-method,
    .htc-homepage #capabilities .ht-cap-method-list {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .htc-homepage #capabilities .ht-cap-disciplines {
        margin-top: 28px;
    }

    .htc-homepage #capabilities .ht-cap-discipline,
    .htc-homepage #capabilities .ht-cap-method-item {
        min-width: 0;
        padding: 22px;
        border: 1px solid rgba(255, 255, 255, 0.20);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.06);
    }

    .htc-homepage #capabilities .ht-cap-number {
        display: block;
        margin-bottom: 14px;
        color: #a9d7ff;
        font-size: 10px;
        line-height: 1.6;
    }

    .htc-homepage #capabilities .ht-cap-discipline h3 {
        margin: 0 0 14px;
        font-size: 25px;
    }

    .htc-homepage #capabilities .ht-cap-method {
        margin-top: 32px;
        padding-top: 30px;
        border-top: 1px solid rgba(255, 255, 255, 0.22);
    }

    .htc-homepage #capabilities .ht-cap-deliverables {
        margin-top: 30px;
    }

    /* ĐỘI NGŨ */

    .htc-homepage #team.ht-team {
        padding: 60px 0;
        background-color: #ffffff;
        background-image: linear-gradient( rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.82) ), url("/assets/team-background.png?v=mobile1");
        background-position: center;
        background-size: cover;
        background-repeat: no-repeat;
    }

        .htc-homepage #team.ht-team::before {
            content: none;
        }

    .htc-homepage #team .ht-org-level {
        display: flex;
        justify-content: center;
    }

    .htc-homepage #team .ht-org-members {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .htc-homepage #team .ht-person {
        width: 100%;
        max-width: 390px;
        min-width: 0;
        margin-right: auto;
        margin-left: auto;
    }

    .htc-homepage #team .ht-person-photo {
        width: 100%;
        overflow: hidden;
    }

        .htc-homepage #team .ht-person-photo img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center top;
        }

    /* LIÊN HỆ */

    .htc-homepage #contact.htc-contact {
        padding: 60px 0 28px;
    }

    .htc-homepage #contact .htc-contact-layout,
    .htc-homepage #contact .htc-contact-form-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .htc-homepage #contact #contactTitle {
        font-size: 38px;
    }

    .htc-homepage #contact .htc-contact-form {
        min-width: 0;
        padding: 24px 20px;
    }

        .htc-homepage #contact .htc-contact-form input,
        .htc-homepage #contact .htc-contact-form select,
        .htc-homepage #contact .htc-contact-form textarea {
            font-size: 16px;
        }

    /* FAQ VÀ CHÂN TRANG */

    .htc-homepage .faq.section {
        padding: 54px 0;
    }

    .htc-homepage .faq-list {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .htc-homepage .faq h2 {
        font-size: 30px;
    }

    .htc-homepage .footer-grid,
    .htc-homepage .footer-bottom {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    /* Nút nổi: gọn lại, tránh che nhiều nội dung */

    .htc-homepage .floating-contact {
        right: 8px;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        gap: 8px;
    }

        .htc-homepage .floating-contact a {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            font-family: Arial, sans-serif;
            font-size: 17px;
            line-height: 1;
        }

            /* Điện thoại chỉ giữ nút gọi và về đầu trang */
            .htc-homepage .floating-contact a[href^="mailto:"] {
                display: none;
            }
}

/* Màn hình điện thoại ngang */
@media (max-width: 760px) and (max-height: 500px) {
    .htc-homepage #home.hero-carousel {
        min-height: 500px;
        max-height: none;
    }
}
/* ==========================================
   BỔ SUNG: BANNER ĐIỆN THOẠI
   Ảnh phía trên — nội dung phía dưới
   ========================================== */

/* Luôn ẩn lớp logo khi JavaScript kết thúc giới thiệu */
#home.hero-carousel #heroIntro[hidden] {
    display: none !important;
}

@media (max-width: 760px) {

    /* Khung banner tự tăng chiều cao theo nội dung */
    .htc-homepage #home.hero-carousel {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: 0;
        max-height: none;
        overflow: hidden;
        background: #102e50;
    }

        /* Khi logo còn hiện: giữ một màn hình giới thiệu */
        .htc-homepage #home.hero-carousel.intro-active {
            height: calc(100svh - 76px);
            min-height: 480px;
        }

    /* Ảnh tách thành một vùng riêng */
    .htc-homepage #home .hero-visual {
        position: relative;
        inset: auto;
        z-index: 0;
        flex: 0 0 auto;
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 3;
        margin: 0;
        padding: 0;
        overflow: hidden;
        background: #ffffff;
    }

        /* Hiển thị trọn ảnh, tránh cắt mô hình và người */
        .htc-homepage #home .hero-visual img {
            display: block;
            width: 100%;
            height: 100%;
            min-height: 0;
            max-height: none;
            margin: 0;
            padding: 0;
            object-fit: contain;
            object-position: center;
            background: #ffffff;
        }

    /* Không phủ tối ảnh vì chữ đã nằm ở vùng riêng */
    .htc-homepage #home .hero-shade {
        display: none;
    }

    /* Khối chữ phía dưới ảnh */
    .htc-homepage #home .hero-grid {
        position: relative;
        z-index: 1;
        display: block;
        flex: 0 0 auto;
        width: 100%;
        height: auto;
        min-height: 0;
        max-width: none;
        margin: 0;
        padding: 28px 24px 20px;
        background: #102e50;
    }

    .htc-homepage #home .hero-copy {
        width: 100%;
        max-width: 540px;
        margin: 0 auto;
    }

    .htc-homepage #home .eyebrow {
        margin: 0 0 12px;
        color: #9fcff6;
        font-size: 9px;
        font-weight: 700;
        line-height: 1.7;
        letter-spacing: 1.25px;
    }

    .htc-homepage #home h1 {
        margin: 0 0 14px;
        color: #ffffff;
        font-size: clamp(27px, 7vw, 35px);
        font-weight: 700;
        line-height: 1.18;
        letter-spacing: -0.6px;
    }

        .htc-homepage #home h1 span {
            color: #ffffff;
        }

    .htc-homepage #home .lead {
        max-width: none;
        margin: 0 0 22px;
        color: #d7e5f1;
        font-size: 14px;
        line-height: 1.75;
    }

    .htc-homepage #home .actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 10px;
    }

        .htc-homepage #home .actions .button {
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 0;
            min-height: 46px;
            margin: 0;
            padding: 11px 10px;
            font-size: 11px;
            line-height: 1.5;
            text-align: center;
            white-space: normal;
        }

    /* Bộ điều khiển nằm dưới nội dung */
    .htc-homepage #home .hero-bottom {
        position: relative;
        inset: auto;
        z-index: 2;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        margin: 0;
        padding: 12px 16px 24px;
        background: #102e50;
    }

    .htc-homepage #home .hero-scroll {
        display: none;
    }

    .htc-homepage #home .carousel-controls {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        max-width: 100%;
        gap: 8px;
        color: #ffffff;
    }

    .htc-homepage #home #slideCounter {
        font-size: 11px;
        white-space: nowrap;
    }

    .htc-homepage #home #slidePrev,
    .htc-homepage #home #slideNext {
        width: 34px;
        height: 36px;
        min-height: 36px;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 6px;
        background: transparent;
        color: #ffffff;
        font-size: 24px;
        line-height: 1;
    }

    .htc-homepage #home .dots {
        display: flex;
        align-items: center;
        gap: 2px;
    }

        /* Vùng bấm lớn, chấm hiển thị nhỏ */
        .htc-homepage #home .dots button {
            display: grid;
            place-items: center;
            width: 18px;
            height: 36px;
            min-height: 36px;
            margin: 0;
            padding: 0;
            border: 0;
            border-radius: 0;
            background: transparent;
        }

            .htc-homepage #home .dots button::before {
                content: "";
                width: 6px;
                height: 6px;
                border-radius: 50%;
                background: #718fa9;
            }

            .htc-homepage #home .dots button.active::before {
                background: #ffffff;
            }

    .htc-homepage #home #slidePause {
        min-height: 36px;
        padding: 8px 10px;
        border-radius: 6px;
        font-size: 11px;
        line-height: 1.4;
    }

    /* Logo giới thiệu */
    .htc-homepage #home #heroIntro {
        position: absolute;
        inset: 0;
        z-index: 5;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 28px;
        background: #ffffff;
    }

        .htc-homepage #home #heroIntro img {
            width: min(100%, 350px);
            height: auto;
            max-height: 55svh;
            object-fit: contain;
        }

        /* Logo đã có slogan trong ảnh */
        .htc-homepage #home #heroIntro > p {
            display: none;
        }

    /* Bỏ hiệu ứng có thể làm banner nhấp nháy khi đổi ảnh */
    .htc-homepage #home.switching,
    .htc-homepage #home.switching .hero-copy,
    .htc-homepage #home.switching .hero-visual {
        animation: none;
        transform: none;
    }

    /* Nhịp nội dung gọn hơn */
    .htc-homepage #about.ht-about-background,
    .htc-homepage #services.ht-services,
    .htc-homepage #capabilities.ht-capabilities,
    .htc-homepage #team.ht-team {
        padding-top: 48px;
        padding-bottom: 48px;
    }

    .htc-homepage #about .ht-about-value,
    .htc-homepage #about .ht-about-purpose-item,
    .htc-homepage #services .ht-service-card,
    .htc-homepage #capabilities .ht-cap-discipline,
    .htc-homepage #capabilities .ht-cap-method-item {
        padding: 20px;
        border-radius: 14px;
    }

    .htc-homepage #about .ht-about-values-grid,
    .htc-homepage #services .ht-services-grid,
    .htc-homepage #capabilities .ht-cap-disciplines,
    .htc-homepage #capabilities .ht-cap-method-list {
        gap: 14px;
    }

    .htc-homepage #about p,
    .htc-homepage #services p,
    .htc-homepage #capabilities p {
        font-size: 14px;
        line-height: 1.8;
    }

    .htc-homepage .reveal {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }
}

@media (max-width: 360px) {
    .htc-homepage #home .hero-grid {
        padding-right: 20px;
        padding-left: 20px;
    }

    .htc-homepage #home .actions {
        grid-template-columns: minmax(0, 1fr);

    }
}
@media (max-width: 760px) {
    .htc-homepage .floating-contact a.htc-zalo-button {
        font-size: 10px;
        font-weight: 800;
    }
}
