/* ================= RESET & TYPOGRAPHY (ĐỒNG NHẤT ARIAL) ================= */
body, h1, h2, h3, h4, h5, h6, p, span, div, li, td, th {
    font-family: Arial, Helvetica, sans-serif !important;
}

body {
    background: #cbd5e1;
    color: #222222;
    font-size: 15px;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .tour-title, .section-title, .day-title, .company-name, .table-khoihanh th {
    font-weight: bold !important;
}

img, svg, webp {
    vertical-align: middle;
    border-radius: 8px;
}

/* Font Awesome — không bị Arial global ghi đè khi html2canvas chụp PDF */
i.fa-solid,
i.fas {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-style: normal !important;
}

i.fa-regular,
i.far {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
    font-style: normal !important;
}

i.fa-brands,
i.fab {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
    font-style: normal !important;
}

i[class*="fa-"] {
    display: inline-block;
    font-style: normal !important;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
}

/* ================= THƯƠNG HIỆU CAM ================= */
:root {
    --brand-orange: #f38a2d;
    --brand-orange-dark: darkorange;
    --brand-orange-deep: #e3843e;
    --brand-orange-bg: #fff7ed;
    --brand-orange-border: #fed7aa;
}

.text-brand {
    color: var(--brand-orange-dark) !important;
}

.a4-page .text-brand,
.a4-page .text-primary,
.a4-page .text-info,
.a4-page .text-success {
    color: var(--brand-orange-dark) !important;
}

/* ================= FIX ĐỊNH DẠNG TỪ EDITOR ================= */

.rte-content p, .rte-content span, .rte-content div, .rte-content li {
    font-size: 15px !important;
    line-height: 1.7 !important;
    color: #333333 !important;
}

.rte-content p, .rte-content div {
    margin-left: 0 !important;
    margin-right: 0 !important;
    text-align: justify;
}

.rte-content ul, .rte-content ol {
    padding-left: 24px !important;
    margin-left: 0 !important;
    margin-bottom: 15px !important;
}

.rte-content li {
    margin-bottom: 8px !important;
    text-align: justify !important;
    list-style-position: outside !important;
}

/* PDF-safe bold: Arial không có glyph Việt ở 800/900 → html2canvas lỗi dấu */
.a4-page strong,
.a4-page b,
.rte-content strong,
.rte-content b,
.tour-title strong,
.tour-title b {
    font-weight: 700 !important;
    font-family: Arial, Helvetica, sans-serif !important;
}

.a4-page .fw-extra-bold {
    font-weight: 700 !important;
}

.a4-page {
    --brochure-pad-x: 23px;
    --brochure-pad-bottom: 23px;
    width: 210mm;
    padding: 0;
    margin: 10mm auto;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.a4-page-body {
    padding: 0 var(--brochure-pad-x) var(--brochure-pad-bottom);
    box-sizing: border-box;
}

/* One-page (không có company-header): khoảng trên tiêu đề tour */
.a4-page-body--no-header {
    padding-top: 32px;
}

.a4-page-body--no-header .tour-title {
    margin-top: 0;
    margin-bottom: 28px;
}

/* ================= HEADER CÔNG TY ================= */

.company-header {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0 0 25px 0;
    padding: 14px var(--brochure-pad-x) 15px;
    /*border-bottom: 2px solid #e6a934;*/
    background: linear-gradient(165deg, #fffffe 0%, #ffe8b359 45%, #FF9800 100%);
    box-sizing: border-box;
}

.company-logo {
    flex-shrink: 0;
    max-width: 150px;
    max-height: 80px;
    margin-right: 25px;
    object-fit: contain;
}

.company-info {
    flex: 1;
    min-width: 0;
}

.company-header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 12px;
}

.company-header-hotline {
    background: linear-gradient(352deg, #FF5722 0%, #f0a02b 100%) !important;
    white-space: nowrap;
    font-size: 16px;
    font-weight: bold;
    flex-shrink: 0;
}

/* ================= HEADER ĐỐI TÁC (One-page.aspx) — trung tính, không màu thương hiệu công ty ================= */

.partner-header {
    display: flex;
    align-items: stretch;
    width: 100%;
    margin: 0 0 22px 0;
    padding: 16px var(--brochure-pad-x);
    box-sizing: border-box;
    background: #ffffff;
    border-bottom: 2px solid #e2e8f0;
    border-radius: 0px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    gap: 18px;
}

.partner-header__brand {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 108px;
    min-height: 88px;
    padding: 10px;
    background: #f8fafc8a;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.partner-header__logo {
    display: block;
    max-width: 100%;
    max-height: 68px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.partner-header__info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.partner-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 16px;
}

.partner-header__details {
    flex: 1;
    min-width: 0;
}

.partner-header__name {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    color: #0f172a;
    text-transform: none;
    letter-spacing: normal;
    text-align: left;
    text-transform: uppercase;
}

.partner-header__line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    color: #475569;
}

.partner-header__line:last-child {
    margin-bottom: 0;
}

.partner-header__line i {
    width: 14px;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    flex-shrink: 0;
}

.partner-header__sep {
    color: #cbd5e1;
    font-weight: 400;
    padding: 0 2px;
}

.partner-header__contact-label {
    color: #64748b;
    font-weight: 600;
}

.partner-header__contact {
    flex-shrink: 0;
    text-align: right;
}

.partner-header__hotline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    color: #1e293b;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 30px;
    white-space: nowrap;
}

.partner-header__hotline i {
    color: #64748b;
    font-size: 13px;
}

.a4-page.pdf-capture-mode .partner-header {
    margin: 0 0 22px 0 !important;
    width: 100% !important;
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
}

/* html2canvas: ổn định layout khi chụp PDF */
.a4-page.pdf-capture-mode {
    overflow: visible !important;
    height: auto !important;
    box-shadow: none !important;
    margin: 0 auto !important;
}

.a4-page.pdf-capture-mode .company-header {
    margin: 0 0 25px 0 !important;
    width: 100% !important;
}

.company-name {
    text-align: center;
    font-size: 28px;
    color: #f38a2d;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: normal;
}

.company-info p {
    margin: 0;
    font-size: 14px;
    color: #444444;
    font-weight: bold;
}

.tour-title {
    font-size: 22px;
    color: darkorange;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 25px;
    line-height: 1.4;
    padding: 0 20px;
}

.section-title {
    font-size: 18px;
    color: #dc2626;
    text-transform: uppercase;
    margin-bottom: 15px;
    margin-top: 20px;
    padding-bottom: 5px;
    /*border-bottom: 2px solid #dc2626;*/
    display: inline-block;
}

.tour-gallery {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    justify-content: center;
}

    .tour-gallery img {
        flex: 1;
        max-width: 32%;
        max-height: 200px;
        object-fit: cover;
        border-radius: 12px;
        box-shadow: 0 3px 6px rgba(0,0,0,0.05);
    }

/* ================= BẢNG TÓM TẮT & NỔI BẬT ================= */

.summary-box {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #fff7ed 0%, #fff 55%, #fffbeb 100%);
    border-left: 2px dashed #e6a934;
}

.summary-item {
    margin-bottom: 10px;
    font-size: 15px;
}

    .summary-item strong {
        color: #111111;
        display: inline-block;
        width: 125px;
    }

    .summary-item span {
        font-weight: 600;
    }

    .summary-item i {
        color: darkorange;
        width: 20px;
        text-align: center;
    }

/* Giá cố định (catalog) trong summary-box */
.summary-pricing {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px dashed var(--brand-orange-border);
}

.summary-price-card {
    flex: 1 1 220px;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 14px 16px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.summary-price-card--adult {
    border-left: 4px solid var(--brand-orange-dark);
    background: linear-gradient(135deg, #ffffff 0%, #fff7ed 100%);
}

.summary-price-card--child {
    border-left: 4px solid #64748b;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.summary-price-card__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.summary-price-card--adult .summary-price-card__icon {
    background: rgba(255, 140, 0, 0.14);
    color: var(--brand-orange-dark);
}

.summary-price-card--child .summary-price-card__icon {
    background: rgba(100, 116, 139, 0.14);
    color: #475569;
}

.summary-price-card__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.summary-price-card__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #94a3b8;
    line-height: 1.2;
}

.summary-price-card--adult .summary-price-card__label {
    color: #c2410c;
}

.summary-price-card--child .summary-price-card__label {
    color: #64748b;
}

.summary-price-card__amount {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.summary-price-nl {
    font-size: 20px;
    font-weight: 800;
    color: #ea580c;
    letter-spacing: -0.02em;
}

.summary-price-te {
    font-size: 17px;
    font-weight: 700;
    color: #334155;
}

.a4-page.pdf-capture-mode .summary-pricing {
    break-inside: avoid;
    page-break-inside: avoid;
}

.a4-page.pdf-capture-mode .summary-price-card {
    box-shadow: none;
}

.highlight-box {
    background: #fffbeb;
    border: 2px dashed #f59e0b;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 3px;
}

    .highlight-box .rte-content li {
        color: #b45309;
    }

/* ================= BẢNG GIÁ VÀ KHỞI HÀNH ================= */

.table-khoihanh {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
}

    .table-khoihanh th, .table-khoihanh td {
        border: 1px solid #cbd5e1;
        border-top: 0px;
        border-left: 0px;
        padding: 10px 5px;
        text-align: center !important;
        vertical-align: middle;
    }

    .table-khoihanh th {
        /*background: linear-gradient(183deg, #FF5722 0%, #FF9800 100%) !important;
        color: #fff;*/
        color: white;
        background: linear-gradient(178deg, #FFA600 0%, #F56F21 100%) !important;
        text-transform: uppercase;
        font-size: 14px;
        letter-spacing: 0.5px;
    }

.td-flight-info {
    font-size: 12px;
    text-align: left !important;
    padding-left: 8px !important;
    line-height: 1.3;
}

.price-col {
    color: #dc2626;
    font-weight: bold;
    white-space: normal;
    vertical-align: middle !important;
}

.table-khoihanh .tpt-price-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    line-height: 1.3;
}

.table-khoihanh .tpt-price-nl {
    display: inline-block;
    font-size: 18px;
    font-weight: 700;
    color: orangered;
    white-space: nowrap;
    line-height: 1.35;
}

.table-khoihanh .tpt-price-te {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    line-height: 1.25;
}

.table-khoihanh .tpt-price-te__label {
    font-weight: 500;
    color: #94a3b8;
}

/* ================= LỊCH TRÌNH TỪNG NGÀY ================= */

.day-block {
    background: #ffffff;
    padding: 0 0 15px 0px;
    margin-bottom: 0px;
    border: 0px solid #e2e8f0;
}

.day-header-modern {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 10px;
}

.day-badge {
    background: #ffedd5;
    color: #c2410c;
    font-size: 14px;
    font-weight: bold;
    padding: 6px 16px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.day-title {
    font-size: 17px;
    color: #fff;
    margin: 0;
    width: 100%;
    background: linear-gradient(163deg, #FFA600 0%, #F56F21 100%) repeat scroll 0% 0% !important;
    padding: 5px 13px;
    border-radius: 30px;
    line-height: 1.4;
}

.service-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 3px;
    /*border-bottom: 1px dashed #cbd5e1;*/
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 14px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: bold;
    border: 1px solid transparent;
}

.chip-warning {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}

.chip-info {
    background: var(--brand-orange-bg);
    color: #c2410c;
    border-color: var(--brand-orange-border);
}

.chip-success {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}

/* ================= CSS LƯỚI ẢNH BENTO ================= */

.iti-media-wrapper {
    width: 100%;
    margin: 15px 0 25px;
}

.iti-grid {
    display: grid;
    gap: 10px;
    border-radius: 12px;
    overflow: hidden;
}

    .iti-grid a {
        display: block;
        position: relative;
        overflow: hidden;
        background: #f0f0f0;
    }

    /* Ảnh bình thường */

    .iti-grid img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transform: scale(1.1);
        object-position: center center;
        transition: transform 0.4s ease; /* Thêm transition để hover mượt */
    }

    .iti-grid a:hover img {
        transform: scale(1.05);
    }

    /* ĐÃ FIX: Ảnh Youtube to hơn (1.5) và căn giữa chuẩn xác */

    .iti-grid img.yt-thumb-fix {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
        transform: scale(1.5);
    }

    /* ĐÃ FIX: Giữ hiệu ứng phóng to mượt mà khi hover vào Video (1.5 lên 1.6) */

    .iti-grid a:hover img.yt-thumb-fix {
        transform: scale(1.6);
    }

/* Bố cục lưới */

.iti-grid-1 {
    grid-template-columns: 1fr;
}

    .iti-grid-1 a {
        height: 400px;
    }

.iti-grid-2 {
    grid-template-columns: 1fr 1fr;
}

    .iti-grid-2 a {
        height: 350px;
    }

.iti-grid-3 {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 200px 200px;
}

    .iti-grid-3 a:nth-child(1) {
        grid-row: 1 / 3;
    }

.iti-grid-4 {
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 200px 200px;
}

    .iti-grid-4 a:nth-child(1) {
        grid-column: 1 / 2;
        grid-row: 1 / 3;
    }

    .iti-grid-4 a:nth-child(2) {
        grid-column: 2 / 4;
        grid-row: 1 / 2;
    }

    .iti-grid-4 a:nth-child(3) {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
    }

    .iti-grid-4 a:nth-child(4) {
        grid-column: 3 / 4;
        grid-row: 2 / 3;
    }

.iti-grid-5 {
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 200px 200px;
}

    .iti-grid-5 a:nth-child(1) {
        grid-column: 1 / 2;
        grid-row: 1 / 3;
    }

    .iti-grid-5 a:nth-child(2) {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
    }

    .iti-grid-5 a:nth-child(3) {
        grid-column: 3 / 4;
        grid-row: 1 / 2;
    }

    .iti-grid-5 a:nth-child(4) {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
    }

    .iti-grid-5 a:nth-child(5) {
        grid-column: 3 / 4;
        grid-row: 2 / 3;
    }

/* Lớp phủ & Ghi chú */

.gal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    transition: 0.3s;
}

    .gal-overlay:hover {
        background: rgba(0,0,0,0.1);
    }

.gal-play-icon {
    width: 55px;
    height: 55px;
    background: #fff;
    color: var(--vt-secondary, #333);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    padding-left: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.gal-more-text {
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
}

.iti-caption {
    text-align: center !important;
    font-size: 12.5px !important;
    color: #555555;
    font-style: italic;
    font-weight: normal !important;
    margin-top: 10px;
}

.gal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
}

.gal-play-icon {
    width: 55px;
    height: 55px;
    background: #fff;
    color: var(--vt-secondary, #333);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    padding-left: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.gal-more-text {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
}

.iti-caption {
    text-align: center !important;
    font-size: 12.5px !important;
    color: #555555;
    font-style: italic;
    font-weight: normal !important;
    margin-top: 10px;
}

.btn-print {
    width: 130px;
    white-space: nowrap;
    position: fixed;
    top: 35%;
    right: 5px;
    z-index: 1000;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(220, 38, 38, 0.4);
    transition: 0.2s;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(315deg, rgb(239, 95, 15) 0%, rgb(246, 63, 183) 100%) !important;
    color: white;
}

    .btn-print:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(220, 38, 38, 0.6);
    }

.table-khoihanh {
    width: 100%;
    border: 2px dashed #f59e0b;
    border-radius: 15px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    background: #fff;
    /* box-shadow: 0 2px 8px rgba(0,0,0,.05);*/
}

.tpt-date {
    display: block;
    color: #dc8f0d;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    margin-bottom: 4px;
}

.brochure-deny-message {
    max-width: 640px;
    margin: 48px auto;
    padding: 24px 28px;
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: darkorange;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 70px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}