/* Responsive compatibility rules for the migrated legacy layout.
 * Bootstrap 5.2.3 itself is provided by bootstrap.min.css. */
.header-inner {
    position: relative;
}

@media (min-width: 769px) {
    .header-inner {
        display: flex;
        align-items: center;
        gap: 20px;
    }
    .header-inner .logo {
        flex: 0 0 90px;
    }
    .header-show .header-inner .logo,
    .header-hide .header-inner .logo {
        flex-basis: 45px;
    }
    .header-inner .menu-bar {
        position: static;
        flex: 1 1 auto;
        height: auto;
        margin: 0 0 0 auto;
        text-align: right;
    }
    .header-inner .menu > ul {
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }
    .header-inner .menu > ul > li {
        white-space: nowrap;
    }
    .header-inner .menu > ul > li + li {
        margin-left: 22px;
    }
    .header-inner .lang {
        position: static;
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        height: auto;
        margin: 0;
    }
}

@media (min-width: 769px) and (max-width: 1199.98px) {
    .header-inner { gap: 12px; }
    .header-inner .menu > ul > li + li { margin-left: 12px; }
    .header-inner .menu > ul > li > a {
        font-size: 14px;
        letter-spacing: 0;
    }
    .header-inner .lang a + a { margin-left: 6px; }
}

.bootstrap-grid > .tour-left,
.bootstrap-grid > .tour-right,
.bootstrap-grid > .tourD-left,
.bootstrap-grid > .tourD-right,
.bootstrap-grid > .news-left,
.bootstrap-grid > .news-right,
.bootstrap-grid > .footer-menu,
.bootstrap-grid > .footer-trip,
.bootstrap-grid > .footer-about,
.bootstrap-grid > .footer-info,
.bootstrap-grid > .footer-email {
    margin-right: 0;
}

@media (min-width: 992px) {
    .bootstrap-grid > .footer-about {
        flex: 0 0 auto;
        width: 24%;
    }
    .bootstrap-grid > .footer-info {
        flex: 0 0 auto;
        width: 41%;
    }
    .bootstrap-grid > .footer-email {
        flex: 0 0 auto;
        width: 35%;
    }

    .footer-email > p,
    .footer-email > form,
    .footer-email > #emailresult {
        max-width: 430px;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .bootstrap-grid > .footer-about,
    .bootstrap-grid > .footer-info {
        flex: 0 0 auto;
        width: 50%;
    }
    .bootstrap-grid > .footer-email {
        flex: 0 0 auto;
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .bootstrap-grid > .footer-about,
    .bootstrap-grid > .footer-info,
    .bootstrap-grid > .footer-email {
        width: 100%;
    }
}

.main-detail img,
.tour-img img,
.news-img img,
.khuyenmai-img img,
.diadiem-wrap img {
    max-width: 100%;
    height: auto;
}


/* Video trong nội dung luôn giữ đúng tỷ lệ, không bị dẹp bởi height="auto". */
.main-detail iframe[src*="youtube.com"],
.main-detail iframe[src*="youtube-nocookie.com"],
.main-detail iframe[src*="youtu.be"] {
    display: block;
    width: 100% !important;
    max-width: 820px;
    height: auto !important;
    aspect-ratio: 16 / 9;
    margin: 18px auto !important;
    border: 0;
}

/* Keep the overlay below the content, matching the original site. */
body .taisao::before {
    z-index: 0;
    pointer-events: none;
}

body .taisao > .container {
    position: relative;
    z-index: 1;
}

body .taisao-title h2 {
    margin-bottom: 4px;
}


/* Bootstrap card layout replacing the legacy float-based tour rows. */
.tour-item.bootstrap-tour-card {
    margin-right: 0;
    margin-left: 0;
    overflow: hidden;
}
.bootstrap-tour-card > .tour-img a,
.bootstrap-tour-card > .tour-img img {
    display: block;
    width: 100%;
    height: 100%;
}
.bootstrap-tour-card > .tour-img img { object-fit: cover; }
.bootstrap-tour-card > .tour-wrap {
    display: flex;
    min-width: 0;
    gap: 15px;
}
.bootstrap-tour-card .tour-info {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
}
.bootstrap-tour-card .tour-price {
    position: static;
    flex: 0 0 170px;
    width: auto;
    height: auto;
    margin: 0;
}

.rentD-string.row > li {
    margin: 0;
}
.rentD-form form.row > .form-item {
    margin: 0;
}

@media (max-width: 575.98px) {
    .bootstrap-tour-card > .tour-wrap { display: block; }
    .bootstrap-tour-card .tour-price {
        width: 100%;
        padding: 15px 0 0;
        border-top: 1px dashed #d7d7d7;
        border-left: 0;
    }
}

@media all and (max-width: 1169px) {
    .wrap:not(.container) { width: calc(100% - 30px); }
    .hide-desktop { display: none !important; }
}

@media all and (max-width: 992px) {
    .search-home { width: calc(100% - 1.5rem); }
    .search-page { width: 100%; }
}

@media all and (max-width: 768px) {
    .header-2 { padding-top: 61px; }
    .logo { width: 45px; margin: 0 auto; }
    .icon li a.menu-button {
        background-color: var(--main);
        border-color: var(--main);
        color: var(--wite);
        border-radius: 5px;
    }
}

@media all and (max-width: 580px) {
    .footer-menu > ul > li:nth-child(1) { width: 100%; margin-bottom: 30px; }
    .footer-menu > ul > li:nth-child(2),
    .footer-menu > ul > li:nth-child(3) { width: 50%; }
}

@media all and (max-width: 480px) {
    .footer-title { font-size: 16px; }
}
