/* ==========================================================================
   Cao Nguyên Tourist - Modern UI Layer (2026 Redesign)
   Note: Redesigned pages do NOT load Bootstrap CSS or legacy main.css/style.css,
   preventing .hidden / reset conflicts with Tailwind CSS.
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

body {
    opacity: 1 !important;
    font-family: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
    background-color: #f8faf8;
    color: #1e293b;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Prevent iOS zoom on form inputs */
@media screen and (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* Hero Gradient Overlay matching Demo */
.hero-gradient {
    background: linear-gradient(180deg, rgba(9, 41, 13, 0.72) 0%, rgba(9, 41, 13, 0.42) 45%, rgba(9, 41, 13, 0.88) 100%);
}

/* Card Image Zoom */
.tour-card .tour-img,
.dest-card .dest-img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.tour-card:hover .tour-img,
.dest-card:hover .dest-img {
    transform: scale(1.07);
}

/* Mega-Menu & Desktop Dropdowns with Zero-Gap Hover Bridge */
.cnt-nav-dropdown {
    position: relative;
}
.cnt-nav-panel {
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}
.cnt-nav-panel::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -18px;
    height: 18px;
}
.cnt-nav-dropdown:hover .cnt-nav-panel,
.cnt-nav-dropdown:focus-within .cnt-nav-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Marquee cleanup */
.marquee {
    margin: 0;
}

/* Visually hidden SEO H1 from seo.php (prevent white bar above header) */
.hidden-seoh {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Minimal Bootstrap Modal & Validation Replacement (for #popup-notify, #popup, forms) */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    display: none;
    width: 100%;
    height: 100%;
    overflow: hidden;
    outline: 0;
}
.modal.show {
    display: block;
}
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: 100vw;
    height: 100vh;
    background-color: rgba(2, 6, 23, 0.6);
    backdrop-filter: blur(3px);
}
.modal-dialog {
    position: relative;
    width: auto;
    margin: 1rem auto;
    max-width: 500px;
    pointer-events: none;
}
.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 2rem);
}
.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #ffffff;
    border-radius: 1.25rem;
    outline: 0;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.invalid-feedback,
.invalid-tooltip {
    display: none;
    font-size: 12px;
    color: #dc2626;
    margin-top: 4px;
    font-weight: 600;
}
.was-validated .form-control:invalid ~ .invalid-feedback,
.was-validated input:invalid ~ .invalid-tooltip,
.was-validated textarea:invalid ~ .invalid-tooltip {
    display: block;
}

/* ==========================================================================
   Rich CKEditor Content (.content-main, .content-tabs-pro-detail)
   ========================================================================== */
.content-main,
.content-tabs-pro-detail {
    color: #334155;
    font-size: 15.5px;
    line-height: 1.85;
    word-break: break-word;
}
.content-main h2,
.content-tabs-pro-detail h2 {
    font-family: 'Montserrat', 'Be Vietnam Pro', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    margin: 1.85rem 0 0.85rem;
    padding-left: 14px;
    border-left: 4px solid #2E8B36;
    line-height: 1.35;
    scroll-margin-top: 96px;
}
.content-main h3,
.content-tabs-pro-detail h3 {
    font-family: 'Montserrat', 'Be Vietnam Pro', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1B5E20;
    margin: 1.35rem 0 0.55rem;
    line-height: 1.4;
    scroll-margin-top: 96px;
}
.content-main h4,
.content-tabs-pro-detail h4 {
    font-weight: 700;
    color: #0f172a;
    margin: 1.1rem 0 0.45rem;
    scroll-margin-top: 96px;
}
.content-main p,
.content-tabs-pro-detail p {
    margin-bottom: 1rem;
}
.content-main ul,
.content-main ol,
.content-tabs-pro-detail ul,
.content-tabs-pro-detail ol {
    margin: 0.75rem 0 1.15rem 1.35rem;
    padding-left: 0.5rem;
}
.content-main ul,
.content-tabs-pro-detail ul {
    list-style: disc;
}
.content-main ol,
.content-tabs-pro-detail ol {
    list-style: decimal;
}
.content-main li,
.content-tabs-pro-detail li {
    margin-bottom: 0.45rem;
}
.content-main figure,
.content-tabs-pro-detail figure {
    margin: 1.5rem auto !important;
    text-align: center;
}
.content-main figcaption,
.content-tabs-pro-detail figcaption {
    font-size: 12.5px;
    font-style: italic;
    color: #64748b;
    margin-top: 8px;
    line-height: 1.5;
}
.content-main img,
.content-tabs-pro-detail img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 14px;
    margin: 1rem auto;
    display: block;
    box-shadow: 0 6px 20px -6px rgba(15, 23, 42, 0.14);
}
.content-main figure img,
.content-tabs-pro-detail figure img {
    margin: 0 auto;
}
.content-main a,
.content-tabs-pro-detail a {
    color: #2E8B36;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.content-main a:hover,
.content-tabs-pro-detail a:hover {
    color: #1B5E20;
}
.content-main table,
.content-tabs-pro-detail table {
    width: 100% !important;
    max-width: 100%;
    border-collapse: collapse;
    margin: 1.35rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
@media (max-width: 767px) {
    .content-main table,
    .content-tabs-pro-detail table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
.content-main th,
.content-main td,
.content-tabs-pro-detail th,
.content-tabs-pro-detail td {
    border: 1px solid #e2e8f0;
    padding: 10px 14px;
    font-size: 13.5px;
    text-align: left;
    vertical-align: top;
}
.content-main th,
.content-tabs-pro-detail th {
    background: #f0fdf4;
    color: #166534;
    font-weight: 700;
}
.content-main tr:nth-child(even) td,
.content-tabs-pro-detail tr:nth-child(even) td {
    background: #f8fafc;
}
.content-main blockquote,
.content-tabs-pro-detail blockquote {
    border-left: 4px solid #3FAE48;
    background: #f0fdf4;
    padding: 14px 18px;
    border-radius: 0 14px 14px 0;
    margin: 1.35rem 0;
    font-style: italic;
    color: #09290D;
}

/* Auto TOC Box (.meta-toc & .box-readmore) */
.meta-toc .box-readmore {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-left: 4px solid #2E8B36;
    border-radius: 16px;
    padding: 16px 20px;
    margin: 18px 0 24px;
}
.meta-toc .box-readmore .toc-list {
    list-style: none !important;
    counter-reset: item;
    margin: 10px 0 0 !important;
    padding-left: 0 !important;
}
.meta-toc .box-readmore .toc-list li {
    display: block;
    counter-increment: item;
    margin-bottom: 6px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.5;
}
.meta-toc .box-readmore .toc-list li:before {
    content: counters(item, ".") ". ";
    color: #2E8B36;
    font-weight: 800;
    margin-right: 4px;
}
.meta-toc .box-readmore .toc-list li ul {
    list-style: none !important;
    counter-reset: item;
    margin: 6px 0 4px 16px !important;
    padding-left: 0 !important;
}
.meta-toc .box-readmore .toc-list li ul li {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
}
.meta-toc .box-readmore .toc-list a {
    color: #334155;
    text-decoration: none;
    transition: color 0.15s;
}
.meta-toc .box-readmore .toc-list a:hover {
    color: #2E8B36;
    text-decoration: underline;
}
.meta-toc.toc-collapsed .toc-list {
    display: none;
}

/* Mid-article Vinpearl-style Tour Card (.news-hotel-card) */
.content-main .news-hotel-card {
    margin: 26px 0 !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    box-shadow: 0 12px 28px -8px rgba(15, 23, 42, 0.12) !important;
    display: grid;
    grid-template-columns: 1fr;
}
@media (min-width: 640px) {
    .content-main .news-hotel-card {
        grid-template-columns: 5fr 7fr;
    }
}
.content-main .news-hotel-card img {
    width: 100% !important;
    height: 220px !important;
    object-fit: cover !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
@media (min-width: 640px) {
    .content-main .news-hotel-card img {
        height: 100% !important;
        min-height: 200px;
    }
}
.content-main .news-hotel-body {
    padding: 18px 20px !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.content-main .news-hotel-title {
    font-family: 'Montserrat', 'Be Vietnam Pro', sans-serif;
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #0f172a;
    margin-bottom: 6px;
    line-height: 1.4;
}
.content-main .news-hotel-desc {
    font-size: 13px !important;
    color: #64748b !important;
    margin-bottom: 14px;
}
.content-main .news-hotel-footer {
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}
.content-main .news-hotel-price strong {
    font-size: 16px !important;
    color: #dc2626 !important;
    font-weight: 800 !important;
}
.content-main .news-hotel-btn {
    background: #FF5722 !important;
    color: #ffffff !important;
    padding: 8px 14px !important;
    border-radius: 12px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 10px -2px rgba(255, 87, 34, 0.35);
}
.content-main .news-hotel-btn:first-of-type {
    background: #f1f5f9 !important;
    color: #1e293b !important;
    box-shadow: none;
}

/* Pagination */
.pagination-home .pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 28px 0 10px;
}
.pagination-home .page-item .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px !important;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-weight: 700;
    font-size: 13px;
    padding: 8px 14px;
    background: #fff;
    transition: all 0.2s;
}
.pagination-home .page-item.active .page-link,
.pagination-home .page-item .page-link:hover {
    background: #2E8B36 !important;
    border-color: #2E8B36 !important;
    color: #ffffff !important;
}

/* Google Map embed */
.map-embed-wrap iframe {
    width: 100% !important;
    height: 380px !important;
    border: 0 !important;
    border-radius: 16px;
    display: block;
}

/* Product Detail Gallery */
.cnt-pro-gallery .MagicZoom,
.cnt-pro-gallery .MagicZoom img {
    width: 100% !important;
    border-radius: 16px !important;
    overflow: hidden;
    display: block;
}
.cnt-pro-gallery .MagicZoom img {
    max-height: 460px;
    object-fit: cover;
}
.cnt-pro-gallery .gallery-thumb-pro {
    margin-top: 12px;
    position: relative;
}
.cnt-pro-gallery .control-carousel {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.92);
    color: #1B5E20;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}
.cnt-pro-gallery .prev-thumb-pro { left: 8px; }
.cnt-pro-gallery .next-thumb-pro { right: 8px; }
.cnt-pro-gallery .owl-thumb-pro .thumb-pro-detail {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}
.cnt-pro-gallery .owl-thumb-pro .thumb-pro-detail img {
    width: 100%;
    height: 76px;
    object-fit: cover;
}
.cnt-pro-gallery .owl-thumb-pro .thumb-pro-detail.mz-thumb-selected,
.cnt-pro-gallery .owl-thumb-pro .thumb-pro-detail:hover {
    border-color: #2E8B36;
}

/* Product Detail Tabs */
.ul-tabs-pro-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 12px;
    margin-bottom: 20px;
    list-style: none;
}
.ul-tabs-pro-detail li {
    padding: 9px 18px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    background: #f1f5f9;
    color: #475569;
    transition: all 0.2s;
}
.ul-tabs-pro-detail li.active {
    background: #2E8B36;
    color: #ffffff;
}
.content-tabs-pro-detail {
    display: none;
}
.content-tabs-pro-detail.active {
    display: block;
}

/* Fix scrollToTop appended by apps.js & hide overlapping reCAPTCHA badge */
.scrollToTop {
    position: fixed;
    right: 24px;
    bottom: 225px;
    width: 42px;
    height: 42px;
    border-radius: 9999px;
    background: #1B5E20;
    color: #ffffff;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 8px 20px -4px rgba(9, 41, 13, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    z-index: 39;
    transition: background-color 0.2s, transform 0.2s;
}
.scrollToTop:hover {
    background: #2E8B36;
    transform: translateY(-2px);
}
.scrollToTop i {
    line-height: 42px;
    display: block;
    text-align: center;
}
@media (max-width: 767px) {
    .scrollToTop {
        right: 14px;
        bottom: 82px;
        width: 38px;
        height: 38px;
    }
    .scrollToTop i {
        line-height: 38px;
    }
}
.grecaptcha-badge {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
