/*
 * tv-typo.css – Chuẩn hóa cỡ chữ & khoảng cách (dùng chung 19 site, cùng template travelvietnam)
 * Phiên bản: 20261110a
 *
 * Nạp SAU style.css, dn-tour-info.css, dn-tour-detail.css.
 * Không sửa style.css riêng từng site (giữ màu thương hiệu), không đổi font, không tải font ngoài.
 *
 * Đơn vị: Bootstrap 3 đặt html{font-size:10px} nên 1rem = 10px. Giữ nguyên gốc này
 * (đổi gốc sẽ phóng to toàn bộ bố cục Bootstrap). 1.8rem = 18px.
 */

:root {
    --tv-fs-body: 1.8rem;      /* nội dung tour / lịch trình / blog trên mobile */
    --tv-fs-body-lg: 1.75rem;  /* nội dung trên máy tính (17.5px) */
    --tv-fs-ui: 1.6rem;        /* menu, nút, ô nhập liệu */
    --tv-fs-meta: 1.5rem;      /* chú thích, thông tin phụ */
    --tv-fs-tiny: 1.4rem;      /* nhãn rất phụ (không thấp hơn mức này) */
    --tv-lh-body: 1.7;
    --tv-lh-ui: 1.45;
    --tv-lh-head: 1.3;
    --tv-space: 1em;
}

/* ---------- 1. Nền chung ---------- */
body {
    line-height: var(--tv-lh-ui);          /* Bootstrap 1.43 quá sát với chữ có dấu */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-wrap: break-word;
}

/* Tiêu đề trang: cân đối trên mobile, tiêu đề dài xuống dòng tự nhiên */
.h1-title, h1 {
    line-height: var(--tv-lh-head);
    text-wrap: balance;
}
@media (max-width: 767px) {
    .h1-title { font-size: 2.6rem; }
    .h2-title, .h4-title, #left-content h2 { line-height: var(--tv-lh-head); }
}

/* ---------- 2. Vùng nội dung dài (đọc) ----------
 * .summary-detail      : giới thiệu tour
 * .content-detail      : lịch trình từng ngày, điều khoản/lưu ý (#policy)
 * .q-detail            : câu trả lời hỏi đáp
 * #left-content .f18   : bài blog, mô tả danh mục
 * .summary-news-detail : trang giới thiệu / trang nội dung
 * Dùng #left-content / lớp template để thắng CSS nhúng trong bài (.xxx-article p ...),
 * không cần !important.
 */
.summary-detail,
.content-detail,
.q-detail,
.summary-news-detail,
#left-content .f18 {
    font-size: var(--tv-fs-body);
    line-height: var(--tv-lh-body);
}

#tour-detail .summary-detail :is(p, li, dd, dt, blockquote),
#tour-detail .content-detail :is(p, li, dd, dt, blockquote),
#tour-detail .q-detail :is(p, li, div),
#left-content .f18 :is(p, li, dd, dt, blockquote),
#left-content .summary-news-detail :is(p, li, dd, dt, blockquote),
#left-content .summary-detail :is(p, li),
#left-content .q-detail :is(p, li, div) {
    font-size: var(--tv-fs-body);
    line-height: var(--tv-lh-body);
}

/* Khoảng cách đoạn / danh sách nhất quán */
#tour-detail .content-detail p,
#tour-detail .summary-detail p,
#left-content .f18 p,
#left-content .summary-news-detail p {
    margin: 0 0 var(--tv-space);
}
#tour-detail .content-detail :is(ul, ol),
#left-content .f18 :is(ul, ol),
#left-content .summary-news-detail :is(ul, ol) {
    margin: 0 0 var(--tv-space);
    padding-left: 1.3em;
}
#tour-detail .content-detail li,
#left-content .f18 li,
#left-content .summary-news-detail li {
    margin: 0 0 .4em;
}

/* Tiêu đề trong nội dung: giữ cấp, không quá to trên mobile */
#left-content .f18 h2, #left-content .summary-news-detail h2, #tour-detail .content-detail h2 {
    line-height: var(--tv-lh-head);
    margin: 1.6em 0 .6em;
}
#left-content .f18 h3, #left-content .summary-news-detail h3, #tour-detail .content-detail h3 {
    line-height: 1.35;
    margin: 1.3em 0 .5em;
}
#left-content .f18 h4, #tour-detail .content-detail h4 {
    font-size: 1.9rem;
    line-height: 1.4;
    margin: 1.2em 0 .4em;
}

/* Chú thích ảnh, ghi chú phụ */
#left-content .f18 :is(figcaption, small, .caption, .wp-caption-text),
#tour-detail .content-detail :is(figcaption, small) {
    font-size: var(--tv-fs-meta);
    line-height: 1.55;
}

/* Ảnh và video nhúng không tràn khung */
#left-content .f18 :is(img, video), #tour-detail .content-detail :is(img, video), .summary-news-detail img {
    max-width: 100%;
    height: auto;
}
#left-content .f18 iframe, #tour-detail .content-detail iframe {
    max-width: 100%;
}

/* ---------- 2b. Style inline của bài cũ ----------
 * Một số bài cũ (Chinatrip, EuroTrip, Thổ Nhĩ Kỳ...) gắn style="font-size:12–15px" thẳng vào thẻ.
 * Style inline chỉ ghi đè được bằng !important, nên giới hạn đúng vùng nội dung và
 * chỉ chọn các giá trị quá nhỏ; tiêu đề/khối to hơn không bị đụng tới.
 */
:is(#left-content .f18, #tour-detail .content-detail, #tour-detail .summary-detail, .summary-news-detail) :is(p, li, span, div, td, font, em, strong, b, i)[style*="font-size"]:is(
    [style*="font-size: 9px"], [style*="font-size:9px"],
    [style*="font-size: 10px"], [style*="font-size:10px"],
    [style*="font-size: 11px"], [style*="font-size:11px"],
    [style*="font-size: 12px"], [style*="font-size:12px"],
    [style*="font-size: 13px"], [style*="font-size:13px"],
    [style*="font-size: 8pt"], [style*="font-size:8pt"],
    [style*="font-size: 9pt"], [style*="font-size:9pt"],
    [style*="font-size: 10pt"], [style*="font-size:10pt"],
    [style*="font-size: small"], [style*="font-size:small"],
    [style*="font-size: x-small"], [style*="font-size:x-small"]
) {
    font-size: var(--tv-fs-meta) !important;
}
/* Đoạn văn / mục danh sách bị gắn 14–17px inline → đưa về cỡ đọc chuẩn */
:is(#left-content .f18, #tour-detail .content-detail, #tour-detail .summary-detail, .summary-news-detail) :is(p, li)[style*="font-size"]:is(
    [style*="font-size: 14px"], [style*="font-size:14px"],
    [style*="font-size: 15px"], [style*="font-size:15px"],
    [style*="font-size: 16px"], [style*="font-size:16px"],
    [style*="font-size: 17px"], [style*="font-size:17px"],
    [style*="font-size: 11pt"], [style*="font-size:11pt"],
    [style*="font-size: 12pt"], [style*="font-size:12pt"]
) {
    font-size: var(--tv-fs-body) !important;
    line-height: var(--tv-lh-body) !important;
}
/* Khối div bọc cả bài gắn 16–17px inline: chữ con kế thừa → nâng khối, giữ chú thích riêng */
:is(#left-content .f18, #tour-detail .content-detail) > div[style*="font-size"]:is(
    [style*="font-size: 16px"], [style*="font-size:16px"],
    [style*="font-size: 17px"], [style*="font-size:17px"]
) {
    font-size: var(--tv-fs-body) !important;
}

/* ---------- 3. Bảng dữ liệu / bảng giá ----------
 * Không thu nhỏ chữ: bảng rộng cuộn ngang trong phạm vi bảng.
 */
#left-content .f18 table,
#tour-detail .content-detail table,
.summary-news-detail table {
    font-size: 1.6rem;
    line-height: 1.55;
}
/* Không đặt padding ô: bài mới đã có thiết kế bảng riêng (.table-wrap) */
@media (max-width: 767px) {
    /* Bảng không có khung cuộn riêng: cho chính bảng cuộn ngang */
    #left-content .f18 table:not(.table-wrap table),
    #tour-detail .content-detail table:not(.table-wrap table),
    .summary-news-detail table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    #left-content .f18 table[width], #tour-detail .content-detail table[width] {
        width: auto !important;   /* thuộc tính width="700" cố định của bài cũ gây tràn trang */
    }
    #left-content .f18 .table-wrap, #tour-detail .content-detail .table-wrap {
        max-width: 100%;
        overflow-x: auto;
    }
}

/* ---------- 4. Trang chi tiết tour ---------- */
/* Tiêu đề từng ngày lịch trình (dn-tour-detail.css có quy tắc mobile riêng → thêm #days để thắng) */
#days .tv-dy-t .ttl { font-size: 1.8rem; line-height: 1.4; }
#days .tv-dy-t .sub { font-size: var(--tv-fs-meta); line-height: 1.5; color: #555; }
#days .tv-dy-n small { font-size: 1.3rem; letter-spacing: .06em; }   /* nhãn "NGÀY" cạnh số ngày lớn */
#days .tv-dy-c > span { font-size: var(--tv-fs-tiny); }               /* bữa ăn */
#days .tv-dy-all { font-size: 1.5rem; }
body .tv-dep-btn { font-size: var(--tv-fs-ui); }

/* Tab / accordion: Lịch trình, Dịch vụ, Lịch khởi hành, Lưu ý... */
#tour-detail .panel-title,
#tour-detail .panel-title > a,
.mda-tap-a.nav-tabs > li > a,
.nav-tabs > li > a {
    font-size: 1.7rem;
    line-height: 1.4;
}
.nav-tabs-guide > li { font-size: var(--tv-fs-ui); }

/* Giá và nút đặt tour: phân cấp rõ */
.price-now { font-size: 2rem; line-height: 1.3; }
.price-old { font-size: var(--tv-fs-meta); }
#giactt { line-height: 1.25; }
.btn-order-tour { font-size: 1.7rem; line-height: 1.4; padding: 10px 30px; }
/* dn-tour-detail.css có thể được nạp sau file này (trong thân trang) → dùng 2 ID để chắc chắn thắng */
.button_contact_price, #left-content #reviews .button_contact_price { font-size: var(--tv-fs-ui); }

/* ---------- 5. Thẻ tour (danh sách, trang chủ, danh mục) ----------
 * dn-tour-info.css được nạp trong thân trang (sau file này) và có quy tắc mobile cùng độ ưu tiên,
 * nên thêm tiền tố "body" để thắng mà không cần !important.
 */
body .dn-rt { font-size: 1.5rem; line-height: 1.55; }
body .dn-fx dt { font-size: var(--tv-fs-tiny); line-height: 1.35; }
body .dn-fx dd { font-size: 1.5rem; line-height: 1.4; }
body .dn-sv { font-size: var(--tv-fs-meta); line-height: 1.5; }
body .dn-dep-dates .dt { font-size: 1.5rem; }
body .dn-disc { font-size: var(--tv-fs-tiny); }
body .dn-val small { font-size: var(--tv-fs-tiny); }
/* Lưới ảnh đoàn khách ở trang chủ (forms/about-us.htm) */
body .doan-anh-luoi figcaption { font-size: var(--tv-fs-tiny); line-height: 1.45; }
body .dn-old s { font-size: var(--tv-fs-meta); }
body .dn-go { font-size: var(--tv-fs-ui); min-height: 46px; }
.h2-tour { line-height: 1.3; }
.h3-news { font-size: 1.7rem; line-height: 1.4; }
.h2-tour-index { line-height: 1.35; }

/* ---------- 6. Header, menu, breadcrumb, phân trang ---------- */
/* Menu chính: .a_menu_main dùng chung cho menu máy tính và menu trượt mobile (jQuery mmenu bản cũ: .mm-list) */
.a_menu_main .fa { font-size: 1.4rem; }                  /* giữ icon nhà đúng cỡ cũ *//* Menu ngang máy tính (.main-menu) vốn đã 16px – không đổi */
.mm-menu .mm-list > li > a,
.mm-menu .mm-list > li > span,
.mm-menu .a_menu_main {
    font-size: 1.7rem;
    line-height: 1.4;
}.breadcrumbs, .pw_item, .pw_item_last { font-size: var(--tv-fs-meta); line-height: 1.5; }
.pagination > li > a, .pagination > li > span {
    font-size: var(--tv-fs-ui);
    min-width: 44px;
    min-height: 44px;
    line-height: 30px;
    text-align: center;
}

/* ---------- 7. Form tư vấn / đặt tour ----------
 * Ô nhập < 16px làm iPhone tự phóng to khi chạm vào ô; đặt 16px.
 */
.form-control,
input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="search"], input[type="date"], select, textarea {
    font-size: var(--tv-fs-ui);
}
.form-control { height: auto; min-height: 44px; padding: 9px 12px; line-height: 1.4; }
textarea.form-control { min-height: 96px; }
.btn, button.btn { font-size: var(--tv-fs-ui); line-height: 1.4; }
label { font-size: 1.5rem; }
.modal-body { font-size: var(--tv-fs-ui); line-height: var(--tv-lh-ui); }

/* ---------- 8. Footer ---------- */
footer { font-size: 1.5rem; line-height: 1.6; }
footer .col-md-7 strong, footer .col-md-7 div, footer .col-md-7 a { font-size: 1.5rem; }
footer .copyright { font-size: var(--tv-fs-tiny); }

/* ---------- 9. Thanh gọi / Zalo cố định không che nội dung, nút gửi form ---------- */
@media (max-width: 768px) {
    /* chừa khoảng cuối trang để 3 nút tròn (gọi/Zalo/Messenger) không che dòng bản quyền cuối cùng */
    footer .copyright { padding-bottom: 72px; }
}

/* ---------- 10. Máy tính bảng & máy tính ---------- */
@media (min-width: 768px) {
    .summary-detail,
    .content-detail,
    .q-detail,
    .summary-news-detail,
    #left-content .f18,
    #tour-detail .summary-detail :is(p, li, dd, dt, blockquote),
    #tour-detail .content-detail :is(p, li, dd, dt, blockquote),
    #tour-detail .q-detail :is(p, li, div),
    #left-content .f18 :is(p, li, dd, dt, blockquote),
    #left-content .summary-news-detail :is(p, li, dd, dt, blockquote),
    #left-content .summary-detail :is(p, li),
    #left-content .q-detail :is(p, li, div) {
        font-size: var(--tv-fs-body-lg);
    }
    footer .copyright { padding-bottom: 0; }
}
@media (min-width: 1200px) {
    #left-content .f18,
    #left-content .f18 :is(p, li, dd, dt, blockquote),
    #tour-detail .content-detail :is(p, li, dd, dt, blockquote),
    #tour-detail .summary-detail :is(p, li, dd, dt, blockquote) {
        font-size: 1.8rem;
    }
}

/* Không đụng icon font: chỉ đặt cỡ trên chữ, icon .fa / .icon-* giữ kích thước gốc */
