@charset "UTF-8";
/* ==========================================================================
   hsg-layout.css – sửa giao diện chung (nạp sau cùng, ghi đè các file cũ)
   1. Header PC: menu canh phải, chừa chỗ khối tài khoản khi đăng nhập
   2. Bộ chọn ngôn ngữ 1 cờ
   3. Header + menu mobile
   4. Lỗi layout các trang (danh sách bài viết, tour...)
   ========================================================================== */

/* ---------- 2. Cờ ngôn ngữ: chọn ảnh theo hreflang, không theo vị trí ---------- */
.nav-main .top-nav ul.language li a[hreflang="en"],
.lang-sp[hreflang="en"], .drawer-quick .lang-item[hreflang="en"] .flag { background-image: url('/shared/img/en.jpg') !important; }
.nav-main .top-nav ul.language li a[hreflang="vi"],
.lang-sp[hreflang="vi"], .drawer-quick .lang-item[hreflang="vi"] .flag { background-image: url('/shared/img/vi.jpg') !important; }
.nav-main.container .top-nav ul ul.language,
.nav-main.container .top-nav ul ul.language:last-child { padding-left: 12px; margin-top: -10px; }

/* ---------- 1. Header PC ---------- */
@media (min-width: 768px) {
    body { --hsg-acc: 15px; }
    body.is-auth { --hsg-acc: 190px; }               /* chừa chỗ khối tài khoản bên phải */
    body.is-guest #header .user-wrapper { display: none; } /* khách: nút Đăng nhập đã nằm trong top-nav */

    #main-menu .only-pc.container { position: relative; }
    .nav-main.container .top-nav { left: auto; right: var(--hsg-acc); top: -25px; padding-left: 0; }
    .nav-main.container .top-nav > ul { justify-content: flex-end; }
    .nav-main.container .pc-nav { text-align: right; padding-right: var(--hsg-acc); }
    .nav-main.container .pc-nav > ul { margin-right: -15px; }
    .nav-main .top-nav li.login-item a span { font-weight: bold; }
}

/* ---------- 3. Mobile ---------- */
@media (max-width: 767px) {
    /* Thanh header: logo + slogan gọn trong 64px, cờ + nút menu bên phải */
    #main-menu .contents-inner { max-height: none; height: 64px; padding-top: 0; }
    #header-sp { top: 0; height: 64px; display: flex; align-items: center; padding-left: 10px; }
    #header-sp #logo { display: block; width: auto; height: auto; flex: 0 0 auto; }
    #header-sp #logo img { max-height: 50px !important; width: auto; display: block; }
    #header-sp .slogan { position: static; display: block; margin-left: 8px; font-size: 11px; line-height: 1.3; white-space: normal; max-width: 170px; }
    .drawer-hamburger { box-sizing: content-box; height: 64px !important; top: 0; padding-top: 0 !important; padding-bottom: 0 !important; }
    .lang-sp {
        position: absolute; top: 26px; right: 66px; z-index: 5;
        width: 30px; height: 20px; font-size: 0; border-radius: 3px;
        background-size: cover; background-position: center; background-repeat: no-repeat;
        box-shadow: 0 0 0 1px rgba(255, 255, 255, .6);
    }
    .drawer-nav { top: 64px; height: calc(100% - 64px); overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 80px; }

    /* Hàng truy cập nhanh đầu menu: Trang chủ / Về HSG / Liên hệ / ngôn ngữ */
    .drawer-menu > li.drawer-quick {
        display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
        padding: 12px 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, .15);
    }
    .drawer-menu > li.drawer-quick > a {
        display: flex; align-items: center; gap: 6px; padding: 9px 10px; margin: 0;
        border: 1px solid rgba(255, 255, 255, .25); border-radius: 6px;
        font-size: 12px; line-height: 1.2; color: #fff; text-transform: none; white-space: normal;
    }
    .drawer-menu > li.drawer-quick > a i { color: #f8b600; width: 14px; text-align: center; }
    .drawer-menu > li.drawer-quick .flag { display: inline-block; width: 22px; height: 15px; background-size: cover; border-radius: 2px; }

    /* Menu con thu gọn, bấm mũi tên để mở */
    .drawer-menu li.has-sub { position: relative; }
    .drawer-menu li.has-sub > a { padding-right: 44px; }
    .drawer-menu li.has-sub > ul,
    .drawer-menu li.has-sub > ul.lv2 { display: none !important; }
    .drawer-menu li.has-sub.open > ul:not(.hidden) { display: block !important; }
    .drawer-menu .sub-toggle {
        position: absolute; top: 0; right: 0; width: 44px; height: 35px;
        background: none; border: 0; color: #fff; font-size: 18px; line-height: 35px; padding: 0;
    }
    .drawer-menu li.has-sub.open > .sub-toggle i { transform: rotate(180deg); }
    .drawer-menu .lv2 > li.has-sub > .sub-toggle { height: 33px; line-height: 33px; }

    /* Hero trang tour: không bị header đè, cao theo nội dung */
    #sec01 .slider.content-tour { height: auto !important; min-height: 400px; }
    #sec01 .slider.content-tour .container.txt.content-tour-header { position: relative; top: 0; bottom: auto; display: block; padding: 84px 3% 24px; }

    /* Khối tài khoản + nút Đặt tour trong menu */
    .drawer-menu .user { padding: 10px 12px; }
    .drawer-menu .user .media { display: flex; align-items: center; gap: 12px; }
    .drawer-menu .user .thumbnail { width: 48px; height: 48px; margin: 0; padding: 0; border-radius: 50%; overflow: hidden; }
    .drawer-menu .user .thumbnail img { width: 48px; height: 48px; object-fit: cover; }
    .drawer-menu .user .user-info-block { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
    .drawer-menu .user .user-info-block .name { font-size: 14px !important; padding: 0; border: 0; }
    .drawer-menu .user .btn { font-size: 12px; padding: 4px 10px; }
    .drawer-menu > li.tel > a { display: block; margin: 12px; padding: 10px; text-align: center; background: #8dc63f; color: #fff; border-radius: 6px; font-weight: bold; border: 0; }
    .drawer-menu > li > hr { display: none; }

    /* Breadcrumb gọn, 1 dòng cuộn ngang được */
    nav.breadcrumb { font-size: 13px; height: auto; }
    nav.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; row-gap: 4px; margin-bottom: 0; }
    nav.breadcrumb li, nav.breadcrumb li a { font-size: 13px !important; line-height: 1.4; }

}

/* ---------- 4. Lỗi layout ---------- */
/* Danh sách bài viết (danh mục blog): các hàng float không clear làm thẻ bị nhảy, lệch cột */
.categories-wrapper .outer { display: flex; flex-wrap: wrap; }
.categories-wrapper .outer::after { content: none; }
.categories-wrapper .outer > [class*="col-"] { float: none; display: flex; }
.categories-wrapper .outer > [class*="col-"] > .inner { float: none; width: 100%; display: flex; flex-direction: column; }
.categories-wrapper .outer > [class*="col-"] > .inner > a { display: flex; flex-direction: column; height: 100%; }
.categories-wrapper .outer > [class*="col-"] .detail { flex: 1; }

/* Thẻ tour (trang danh sách, danh mục, tour liên quan): các dòng thông tin thẳng hàng giữa các thẻ */
.col-3-pc > .inner > .detail > a > h4 { height: auto !important; min-height: 2.7em; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.col-3-pc > .inner > .detail > a > p.text-secondary { min-height: 2.9em; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.col-3-pc > .inner > .detail > a > p:not(.text-secondary) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-3-pc > .inner > .detail > ul li { display: flex; justify-content: space-between; gap: 8px; }
.col-3-pc > .inner > .detail > ul li > span:first-child { flex: 0 0 auto; }
.col-3-pc > .inner > .detail > ul li > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }

/* Mũi tên slider thẻ tour/khách sạn: đặt giữa ảnh, nền tròn, không đè lên chữ */
.swiper-container:has(.box_img) { position: relative; }
.swiper-container:has(.box_img) > .swiper-button-prev,
.swiper-container:has(.box_img) > .swiper-button-next {
    top: 105px !important; width: 36px !important; height: 36px !important; margin-top: 0 !important; border-radius: 50%; color: #2A84C0 !important;
    background-color: rgba(255, 255, 255, .92) !important; box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}
.swiper-container:has(.box_img) > .swiper-button-prev::after,
.swiper-container:has(.box_img) > .swiper-button-next::after { font-size: 15px; font-weight: bold; }
.swiper-container:has(.box_img) > .swiper-button-disabled { opacity: 0; }
@media (max-width: 767px) {
    .swiper-container:has(.box_img) > .swiper-button-prev,
    .swiper-container:has(.box_img) > .swiper-button-next { top: 120px !important; }
}

/* ---------- 5. Khối "Chia sẻ trang này" ---------- */
/* PC: cột icon cố định sát mép trái, giữa màn hình, thẳng lề với nút hotline. Rê chuột hiện tên mạng xã hội */
@media (min-width: 768px) {
    body .hsg-share {
        position: fixed; left: 12px; right: auto; top: 50%; transform: translateY(-50%); z-index: 990;
        width: 40px !important; min-width: 0; margin: 0; align-items: center;
        flex-direction: column; flex-wrap: nowrap; gap: 6px; padding: 0; border: 0; background: none;
    }
    body .hsg-share__title { font-size: 11px; font-weight: 600; color: #555; writing-mode: vertical-rl; transform: rotate(180deg); margin-bottom: 4px; }
    body .hsg-share__list { flex-direction: column; flex-wrap: nowrap; gap: 6px; }
    body .hsg-share__btn { position: relative; width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 50%; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
    body .hsg-share__btn:hover { transform: translateX(3px); opacity: 1; }
    body .hsg-share__btn > span {
        position: absolute; left: 48px; top: 50%; transform: translateY(-50%);
        background: inherit; color: #fff; padding: 7px 12px; border-radius: 16px; font-size: 13px; white-space: nowrap;
        opacity: 0; visibility: hidden; transition: opacity .15s; box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
    }
    body .hsg-share__btn:hover > span { opacity: 1; visibility: visible; }
    body .hsg-share__toast { left: 48px; bottom: auto; top: 50%; transform: translateY(-50%); }
}
/* Mobile: thanh icon cố định dưới cùng, nền đen mờ như header, canh giữa, ẩn chữ */
@media (max-width: 767px) {
    body .hsg-share {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 98;
        flex-wrap: nowrap; justify-content: center; gap: 0; padding: 7px 8px;
        background: rgba(0, 0, 0, .6); border: 0; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    }
    body .hsg-share__title { display: none; }
    body .hsg-share__list { flex-wrap: nowrap; justify-content: center; gap: 6px; }
    body .hsg-share__btn { width: 36px; height: 36px; padding: 0; justify-content: center; border-radius: 50%; }
    body .hsg-share__btn > span { display: none; }
    body .hsg-share__btn svg { width: 17px; height: 17px; }
    body .hsg-share__zl { font-size: 8px; padding: 2px 3px; }
    body .hsg-share__toast { bottom: calc(100% + 6px); }
    body { padding-bottom: 50px; }
    /* Trang tour có thanh "Tải lịch trình / Đặt ngay": thanh chia sẻ nằm ngay trên */
    body:has(.btn-booking-fixed) .hsg-share { bottom: 44px; }
    body:has(.btn-booking-fixed) { padding-bottom: 94px; }
    .hotline { bottom: 60px !important; }
    .totop .top_page { bottom: 112px !important; }
    body:has(.btn-booking-fixed) .hotline { bottom: 112px !important; }
    body:has(.btn-booking-fixed) .totop .top_page { bottom: 162px !important; }
}

/* Hero trang tour PC: cao theo nội dung (bản tiếng Anh dài bị che nút Tải lịch trình / Đặt ngay) */
@media (min-width: 768px) {
    #sec01 .slider.content-tour { height: auto !important; min-height: 620px; }
    #sec01 .slider.content-tour .container.txt.content-tour-header { position: relative; top: 0; bottom: auto; display: block; padding-top: 150px; padding-bottom: 70px; }
}
