/*
Theme Name: Ta Đi Vui Child
Theme URI: https://tadivui.vn/
Description: Theme con của tadivui.COM (combodulich). v3: giao diện mới theo bản thiết kế "Thiết kế lại tadivui.vn" cho 6 nhóm trang (trang chủ, tin tức, bài viết, tour, điểm đến tour, các điểm đến); trang còn lại giữ khung cũ. Không sửa file theme gốc.
Author: Takimedia
Author URI: https://takimedia.com/
Template: combodulich
Version: 3.5.1
Text Domain: tadivui-child
*/

/* ==========================================================================
   1. Token thiết kế (lấy từ bản thiết kế Khám Phá Di Sản)
   ========================================================================== */
:root {
  --tdv-primary: #1E3F8F;
  --tdv-primary-dark: #142C66;
  --tdv-accent: #A8611C;
  --tdv-accent-text: #945414;
  --tdv-gold: #F2C98A;
  --tdv-bg: #FAF7F0;
  --tdv-surface: #FFFFFF;
  --tdv-sand: #F1EADB;
  --tdv-ink: #1C1B19;
  --tdv-text: #2A2824;
  --tdv-muted: #5E5A52;
  --tdv-line: #E8E1D3;
  --tdv-line-strong: #D9D0BE;
  --tdv-radius: 12px;
  --tdv-radius-sm: 8px;
  --tdv-font: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --tdv-serif: 'Lora', Georgia, 'Times New Roman', serif;
}

/* ==========================================================================
   2. Nền tảng
   ========================================================================== */
body {
  font-family: var(--tdv-font);
  background: var(--tdv-bg);
  color: var(--tdv-text);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--tdv-primary); }
a:hover, a:focus { color: var(--tdv-primary-dark); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--tdv-primary);
  outline-offset: 2px;
}

img { max-width: 100%; height: auto; }

/* common.css của theme cha ghi cứng font Roboto ở ~37 chỗ. Ép font mới bằng
   specificity 0 (:where) để các rule serif bên dưới vẫn thắng, và bỏ qua icon font. */
body,
body :where(p, li, a, span, div, h1, h2, h3, h4, h5, h6, label, input, select, textarea, button, td, th, blockquote, strong, em, small, b, dt, dd):where(:not(.fa, .glyphicon, [class*="fa-"], [class*="glyphicon"], [class*="hk-ic"], [class*="lg-"], .mm-btn)) {
  font-family: var(--tdv-font) !important;
}

/* Nút chia sẻ Google+ đã ngừng hoạt động */
a[href*="plus.google"] { display: none !important; }

/* ==========================================================================
   3. Header và menu
   ========================================================================== */
.header-top {
  background: var(--tdv-primary);
  color: #fff;
  font-size: 13px;
}
.header-top a,
.header-top span,
.header-top i { color: #fff; }
.header-top a:hover { color: var(--tdv-gold); }

.header-bot {
  background: var(--tdv-surface);
  border-bottom: 1px solid var(--tdv-line);
}

.hk-menu ul.menu > li > a {
  font-family: var(--tdv-font);
  font-weight: 500;
  color: var(--tdv-ink);
}
.hk-menu ul.menu > li > a:hover,
.hk-menu ul.menu > li.current-menu-item > a,
.hk-menu ul.menu > li.current_page_item > a {
  color: var(--tdv-primary);
}

.hk-menu ul.menu li ul {
  background: var(--tdv-primary);
  border-radius: 0 0 var(--tdv-radius-sm) var(--tdv-radius-sm);
}
.hk-menu ul.menu li ul li a { color: #fff; }
.hk-menu ul.menu li ul li a:hover { color: var(--tdv-gold); }

/* ==========================================================================
   4. Tiêu đề khối
   ========================================================================== */
.hk-title {
  border-bottom: 2px solid var(--tdv-ink);
  margin-bottom: 24px;
}
.hk-content-bot .hk-title { border-bottom: 0; }

.hk-title h1,
.hk-title h2 {
  font-family: var(--tdv-serif) !important;
  font-size: 26px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--tdv-ink);
  margin-top: 0;
}
/* Bỏ icon sprite cũ để đồng bộ với bộ nhận diện mới */
.hk-title h2:before { display: none; }

/* ==========================================================================
   5. Card (tour, điểm đến, tin)
   ========================================================================== */
.hk-tour .detail,
.hk-location .detail,
.lst-items .detail,
.lst-news .detail {
  background: var(--tdv-surface);
  border: 1px solid var(--tdv-line);
  border-radius: var(--tdv-radius);
  overflow: hidden;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.hk-tour .detail:hover,
.hk-location .detail:hover,
.lst-items .detail:hover {
  border-color: var(--tdv-line-strong);
  box-shadow: 0 6px 18px rgba(28, 27, 25, .10);
}

.detail a.img {
  display: block;
  overflow: hidden;
}
.detail a.img img {
  display: block;
  width: 100%;
  height: auto;
}

.detail h3, .detail h4, .detail .title, .detail .name {
  font-weight: 600;
  line-height: 1.4;
}
.detail h3 a, .detail h4 a, .detail .title a, .detail .name a {
  color: var(--tdv-ink);
}
.detail h3 a:hover, .detail h4 a:hover, .detail .title a:hover, .detail .name a:hover {
  color: var(--tdv-primary);
}

/* Giá */
.price, .rate-price, .detail .price {
  color: var(--tdv-accent-text);
  font-weight: 700;
}

/* Trang liệt kê dài (các điểm đến, lọc điểm đến tour): bỏ qua render phần ngoài màn hình */
.lst-items .detail {
  content-visibility: auto;
  contain-intrinsic-size: auto 280px;
}

/* ==========================================================================
   6. Nút
   ========================================================================== */
.btn-primary,
.btn-default.active,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.single_add_to_cart_button,
input[type="submit"] {
  background: var(--tdv-primary);
  border-color: var(--tdv-primary);
  color: #fff;
  border-radius: var(--tdv-radius-sm);
  font-family: var(--tdv-font);
  font-weight: 600;
}
.btn-primary:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.single_add_to_cart_button:hover,
input[type="submit"]:hover {
  background: var(--tdv-primary-dark);
  border-color: var(--tdv-primary-dark);
  color: #fff;
}

input[type="text"],
input[type="search"],
input[type="email"],
input[type="tel"],
select,
textarea {
  border-radius: var(--tdv-radius-sm);
  border-color: var(--tdv-line-strong);
  font-family: var(--tdv-font);
}

/* Tab điểm đến (Trong nước / Nước ngoài) */
.nav-tabs-dd > li > a {
  font-weight: 600;
  color: var(--tdv-ink);
  border-radius: 10px 10px 0 0;
}
.nav-tabs-dd > li.active > a,
.nav-tabs-dd > li.active > a:hover,
.nav-tabs-dd > li.active > a:focus {
  background: var(--tdv-primary);
  color: #fff;
  border-color: var(--tdv-primary);
}

/* ==========================================================================
   7. Bài viết và trang con
   ========================================================================== */
section.single h1 {
  font-family: var(--tdv-serif) !important;
  font-size: 36px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--tdv-ink);
}
section.single .col-md-9 p,
section.single .col-md-9 li {
  font-size: 18px;
  line-height: 1.75;
  color: var(--tdv-text);
}
section.single h2 {
  font-family: var(--tdv-serif) !important;
  font-size: 28px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--tdv-ink);
  margin-top: 36px;
}
section.single h3 {
  font-size: 22px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--tdv-ink);
  margin-top: 28px;
}
section.single img {
  border-radius: 10px;
}
section.single figcaption,
section.single .wp-caption-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--tdv-muted);
  text-align: center;
}
section.single blockquote {
  border-left: 4px solid var(--tdv-accent);
  background: var(--tdv-sand);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  font-size: 17px;
  line-height: 1.6;
}
section.single table {
  width: 100%;
  border-collapse: collapse;
}
section.single table th,
section.single table td {
  border: 1px solid var(--tdv-line);
  padding: 8px 12px;
}
section.single table th { background: var(--tdv-sand); }

/* Mục lục (plugin Fixed TOC) */
#ftwp-container nav,
nav#ftwp-contents {
  font-family: var(--tdv-font);
}

/* Breadcrumb */
.bearch {
  background: transparent;
  color: var(--tdv-muted);
  font-size: 14px;
}
.bearch a { color: var(--tdv-muted); }
.bearch a:hover { color: var(--tdv-primary); }

/* Trang sản phẩm tour (WooCommerce) */
.single-product .product_title,
.single-product h1.entry-title {
  font-family: var(--tdv-serif) !important;
  font-weight: 700;
  color: var(--tdv-ink);
}
.single-product .woocommerce-tabs ul.tabs li.active a {
  color: var(--tdv-primary);
}

/* Phân trang */
.pagination > li > a,
.pagination > li > span,
.page-numbers {
  border-radius: var(--tdv-radius-sm);
  color: var(--tdv-ink);
}
.pagination > .active > a,
.pagination > .active > span,
.page-numbers.current {
  background: var(--tdv-primary);
  border-color: var(--tdv-primary);
  color: #fff;
}

/* ==========================================================================
   8. Danh sách điểm đến cuối trang (thu gọn bằng JS, không có JS thì hiện đủ)
   ========================================================================== */
.top-footer {
  background: var(--tdv-sand);
}
.top-footer ul li a {
  color: var(--tdv-ink);
}
.top-footer ul li a:hover { color: var(--tdv-primary); }

.tdv-collapsible {
  position: relative;
  max-height: 184px;
  overflow: hidden;
}
.tdv-collapsible::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  background: linear-gradient(to bottom, rgba(241, 234, 219, 0), var(--tdv-sand));
  pointer-events: none;
}
.tdv-collapsible.is-open { max-height: none; }
.tdv-collapsible.is-open::after { display: none; }

.tdv-toggle {
  display: block;
  margin: 8px auto 0;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid var(--tdv-line-strong);
  border-radius: 22px;
  background: var(--tdv-surface);
  color: var(--tdv-ink);
  font-family: var(--tdv-font);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.tdv-toggle:hover { border-color: var(--tdv-primary); color: var(--tdv-primary); }

/* ==========================================================================
   9. Footer
   ========================================================================== */
#footer {
  background: var(--tdv-ink);
  color: #D9D4CA;
}
#footer a { color: #fff; }
#footer a:hover { color: var(--tdv-gold); }
#footer a:focus-visible,
#footer button:focus-visible { outline-color: var(--tdv-gold); }
#footer .footer-bot {
  border-top: 1px solid rgba(255, 255, 255, .12);
  color: #A8A297;
}

/* ==========================================================================
   10. Điện thoại và giảm chuyển động
   ========================================================================== */
@media (max-width: 767px) {
  .hk-title h1,
  .hk-title h2 { font-size: 22px; }
  section.single h1 { font-size: 28px; }
  section.single h2 { font-size: 24px; }
  section.single h3 { font-size: 20px; }
  section.single .col-md-9 p,
  section.single .col-md-9 li { font-size: 17px; }
  .tdv-collapsible { max-height: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  .detail,
  .detail:hover { transition: none; }
}

/* ==========================================================================
   11. Đổi nốt màu cũ của theme cha (common.css ghi cứng #1295ff, #eb7629,
       #ff5722, #e00, #169dca, #0079da, #0059a0...)
   ========================================================================== */

/* Tiêu đề khối: bỏ gạch chân cam và inline-block của theme cha, giữ gạch ngang mực */
.hk-title h1,
.hk-title h2 {
  display: block;
  border-bottom: 0;
  padding-bottom: 10px;
  margin-bottom: 0;
}

/* Menu con, sidebar, hover */
.hk-menu ul.menu li ul li a:hover { background: var(--tdv-primary-dark); }

.hk-news-rg,
.hk-support {
  background: var(--tdv-surface);
  border: 1px solid var(--tdv-line);
  border-radius: var(--tdv-radius);
  overflow: hidden;
}
.hk-news-rg h3,
.hk-support h3 { background: var(--tdv-primary); }

.hk-news-rg .info-nws h4 a:hover,
.hk-tour h3 a:hover { color: var(--tdv-primary); }

/* Giá: thay đỏ #e00 / #f00 bằng nâu vàng đạt tương phản 4.5:1 */
.hk-tour .rate-price span,
.txt-blk.info-tour .price,
p.price,
.xe p.price { color: var(--tdv-accent-text); }
p.price strong { color: var(--tdv-primary); }

/* Nút "Xem thêm" và "Chọn điểm đến" (cam #ff5722) */
.hk-ddnb .more,
.hk-content-bot .more,
.text-chon-diem-den {
  background-color: var(--tdv-primary);
  border-radius: 24px;
}

/* Tab: nền mặc định kem, tab đang chọn xanh chàm, viền trên nâu vàng */
ul.nav.nav-tabs li a {
  background: var(--tdv-sand);
  color: var(--tdv-ink);
  border-radius: 10px 10px 0 0;
}
ul.nav.nav-tabs li.active a,
ul.nav.nav-tabs li.active a:hover,
ul.nav.nav-tabs li.active a:focus {
  color: #fff !important;
  background-color: var(--tdv-primary) !important;
  border-top: 4px solid var(--tdv-accent);
}

/* Hộp tìm kiếm trên ảnh bìa trang chủ */
.box-search .tab-content { background: rgba(30, 63, 143, .92) !important; }
.hk-search button { background: var(--tdv-accent); }
.hk-search button:hover,
.hk-search button:focus { background: #8F4F14; }

/* Dải nền xám #f1f1f1 */
.visao,
.loai-tour { background: var(--tdv-sand); }
.visao .title { color: var(--tdv-primary); }
.loai-tour .owl-carousel .owl-item h4 a { color: var(--tdv-ink); }

/* Nút xanh #2d9bf3 và hover xanh lá */
a.btn.btn-primary,
.modal-body input[type="submit"],
a.btn.popup-dangnhap__btn-dangnhap { background: var(--tdv-primary); }
a.btn.btn-primary:hover { background: var(--tdv-primary-dark); }

.back-to-top i { background: var(--tdv-primary); }

/* ==========================================================================
   12. Bố cục v2: thẻ một link, H1 trang chủ
   ========================================================================== */
/* Link trên tiêu đề phủ cả thẻ (stretched link). Ảnh và nút chỉ là hình, bấm đâu cũng mở tour. */
.lst-items .txt-blk h3 a::after,
.hk-ddnb .detail h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
}
.lst-items .detail:focus-within,
.hk-ddnb .detail:focus-within {
  outline: 2px solid var(--tdv-accent);
  outline-offset: 2px;
}
.lst-items .txt-blk h3 a:focus-visible::after { outline: 0; }
/* Hiệu ứng phủ ảnh khi rê chuột vào cả thẻ (link phủ che mất :hover của ảnh) */
.hk-tour .detail:hover a.img:before,
.hk-tour .detail:hover a.img:after { opacity: 1; }
.hk-tour a.img:after { background-color: rgba(30, 63, 143, .55); }

/* Nút giả (span) giữ dáng nút cũ */
.lst-items span.view-detail {
  display: block;
  padding: 8px 0;
  margin: 10px auto 0;
  text-align: center;
  background: var(--tdv-primary);
  color: #fff;
  font-size: 12px;
  line-height: 20px;
  text-transform: uppercase;
  border-radius: 8px;
  position: relative;
}
.lst-items .detail:hover span.view-detail { background: var(--tdv-accent); }
.txt-blk.info-tour .more { text-align: center; }
.txt-blk.info-tour .more span.more-book {
  display: inline-block;
  padding: 6px 22px;
  margin: 6px 5px;
  background: var(--tdv-accent);
  color: #fff;
  font-size: 12px;
  line-height: 20px;
  text-transform: uppercase;
  border-radius: 8px;
}
.txt-blk.info-tour .detail:hover .more-book,
.lst-items .detail:hover .more-book { background: #8F4F14; }

/* H1 trang chủ: một dải mỏng dưới ô tìm kiếm, không chiếm nhiều chỗ */
.tdv-hero-h1 {
  background: var(--tdv-bg);
  border-bottom: 1px solid var(--tdv-line);
  padding: 14px 0 12px;
  text-align: center;
}
.tdv-hero-h1 h1 {
  margin: 0;
  font-family: var(--tdv-serif) !important;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--tdv-ink);
}
@media (max-width: 767px) {
  .tdv-hero-h1 h1 { font-size: 18px; }
}

/* Mô tả điểm đến dưới H1 (taxonomy-diem-den-tour.php) */
.tdv-term-desc {
  max-width: 820px;
  margin: 0 auto 16px;
  color: var(--tdv-muted);
  line-height: 1.7;
}
/* Số điện thoại / email trong sidebar hỗ trợ */
.hk-support a[href^="tel:"],
.hk-support a[href^="mailto:"] { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
/* Danh sách bài cùng chủ đề (chuyển xuống dưới bài) */
#relatedposttags { margin: 20px 0; padding: 14px 16px; background: var(--tdv-sand); border-radius: var(--tdv-radius); }
#relatedposttags .title-related { margin: 0 0 8px; font-size: 16px; }
#relatedposttags ul { margin: 0; padding-left: 18px; }
