/* ==========================================================
// == FILE: CSS/public_tour_detail.css (ĐÃ FIX LỖI STICKY SIDEBAR)
// ========================================================== */

/* --- PHẦN 1: CODE GỐC CỦA BẠN (ĐÃ GIỮ NGUYÊN) --- */
.breadcrumb {
    font-size: 0.9em;
    color: #888;
    margin-bottom: 10px;
    padding-left: 10px;
}
.breadcrumb a {
    color: #007bff;
    text-decoration: none;
}
/* Banner tĩnh cho trang Tours.php */
.static-banner-header {
    background-color: #002d72; /* Xanh đậm */
    color: white;
    padding: 0; 
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    height: 300px; 
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
.static-banner-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../image/trang_an.jpg'); 
    background-size: cover;
    background-position: center;
    opacity: 0.7;
    z-index: 1;
}

/* Ảnh banner theo từng trang (tạm thời, bạn có thể tự đổi ảnh sau) */
.static-banner-header.banner-tours::before {
    background-image: url('../image/trang_an.jpg');
}

.static-banner-header.banner-destinations::before {
    background-image: url('../image/bannercacdiemden.jpg');
}

.static-banner-header.banner-about::before {
    background-image: url('../image/banneraboutme.jpg');
}

.static-banner-header.banner-blog::before {
    background-image: url('../image/bannertrangchu3.jpg');
}

.static-banner-header.banner-contact::before {
    background-image: url('../image/bannertrangchu4.jpg');
}
.static-banner-header h1 {
    font-size: 2.5em;
    margin: 0;
    color: white;
    position: relative;
    z-index: 3;
    background-color: rgba(0, 45, 114, 0.9); 
    padding: 10px 40px;
    text-align: left;
    transform: skewX(-15deg);
    margin-left: 20px; 
    display: inline-block;
}
.static-banner-header h1 span {
    display: inline-block;
    transform: skewX(15deg); 
}

/* CONTAINER TRANG LISTING */
.tour-listing-wrapper {
    display: flex;
    gap: 30px;
    margin-top: 20px;
    width: 95%;
    max-width: 1500px;
    margin: 20px auto; 
}
.tour-listing-sidebar {
    flex: 0 0 280px; 
    padding-top: 10px;
    align-self: flex-start;
}
.tour-listing-content {
    flex-grow: 1;
}
.tour-list-title-main {
    font-size: 1.8em;
    color: #002d72;
    margin-top: 0;
    margin-bottom: 25px;
    text-align: left;
}
.no-results-message {
    text-align: center;
    padding: 30px;
    background: #f8f8f8;
    border-radius: 8px;
    color: #888;
}

/* SIDEBAR FILTER */
.sidebar-filter-box {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.sidebar-filter-box form { display: flex; flex-direction: column; }
.filter-group {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #eee;
}
.filter-group:last-child { border-bottom: none; }
.filter-group label, .filter-group-heading {
    display: flex; align-items: center;
    font-weight: 600;
    color: #002d72;
    margin-bottom: 8px;
    font-size: 1.1em;
}
.filter-group i { color: #ff6600; margin-right: 5px; font-size: 1.2em; }
.form-select, .form-input, .form-range {
    width: 100%; padding: 8px; border: 1px solid #ccc;
    border-radius: 4px; display: block; background-color: #fff;
}
.duration-radio-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; align-items: center;
}
.radio-btn-label {
    display: flex; align-items: center; justify-content: center;
    padding: 8px; border: 1px solid #ccc; border-radius: 4px;
    text-align: center; cursor: pointer; background: #f9f9f9; font-size: 0.9em;
}
.radio-btn-label input[type="radio"] { display: none; }
.radio-btn-label input[type="radio"]:checked + span {
    background-color: #ff6600; color: white; border-radius: 3px; padding: 0 4px;
}
.radio-btn-label span { display: block; }
.custom-input { margin-top: 10px; grid-column: span 2; height: 38px; }
.price-range { padding: 10px 0; }
.price-display {
    font-size: 0.9em; color: #ff6600; font-weight: bold;
    margin-top: 5px; display: flex; justify-content: space-between;
}
.btn-sidebar-submit {
    width: 100%; padding: 10px; background-color: #ff6600;
    color: white; border: none; border-radius: 4px; font-weight: bold; cursor: pointer;
}
.btn-sidebar-reset {
    display: block; text-align: center; color: #007bff;
    margin-top: 10px; text-decoration: none; font-size: 0.9em;
}

/* TOUR GRID 3 CỘT */
.tour-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px; margin-top: 20px;
}
.tour-grid-v2 .tour-card-v2 {
    width: 100%; display: block; background: #fff;
    border: 1px solid #ddd; border-radius: 8px; overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: box-shadow 0.3s ease;
}
.tour-grid-v2 .tour-card-v2:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.tour-grid-v2 .tour-card-image {
    height: 200px; width: 100%; position: relative; overflow: hidden;
}
.tour-grid-v2 .tour-card-image img {
    width: 100%; height: 100%; object-fit: cover;
}
.tour-grid-v2 .tour-card-content { padding: 15px; display: block; }
.tour-grid-v2 .tour-card-content h3 {
    font-size: 1.1em; margin-top: 0; margin-bottom: 10px;
    line-clamp: 2;
    -webkit-line-clamp: 2; height: auto;
}
.tour-card-price {
    padding-top: 10px; border-top: 1px solid #f0f0f0;
    margin-top: 10px; display: flex; align-items: baseline; justify-content: space-between;
}
.tour-card-price .current-price { font-size: 1.4em; }

/* HORIZONTAL SCROLL SECTION */
.other-tours-section {
    margin-top: 50px;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 8px;
    overflow: hidden; /* tránh hiện scrollbar khi dùng slick */
}
.other-tours-title-red {
    background-color: #dc3545; 
    color: white;
    display: inline-block;
    padding: 8px 15px;
    font-size: 1.4em;
    margin-top: -30px; 
    border-radius: 5px;
}
.other-tours-carousel {
    display: flex;
    overflow-x: auto; 
    gap: 20px;
    padding: 20px 0;
    scroll-snap-type: x mandatory;
}
.other-tours-carousel .tour-card-v2 {
    flex: 0 0 300px; 
    scroll-snap-align: start;
    display: block; 
}

/* Khi dùng Slick slider: tắt layout scroll fallback */
.other-tours-carousel.slick-initialized {
    display: block;
    overflow: visible;
    scroll-snap-type: none;
}
.other-tours-carousel.slick-initialized .tour-card-v2 {
    flex: initial;
    scroll-snap-align: none;
}
.other-tours-carousel .tour-card-image {
     height: 200px; 
     width: 100%;
}
.other-tours-carousel .tour-card-content {
    padding: 20px;
}

/* BỐ CỤC TOUR DETAIL CŨ (KHUNG SƯỜN) */
.tour-detail-grid {
    display: flex; gap: 30px; margin-top: 20px;
    /* 🚀 QUAN TRỌNG: Xóa 'align-items: flex-start' để cột bên phải tự kéo dài bằng cột trái */
    /* align-items: flex-start; <--- ĐÃ XÓA DÒNG NÀY */
    position: relative;
}
.tour-left-col { flex: 2; }
.tour-right-col { flex: 0 0 320px; }
.tour-title-main {
    font-size: 2.2em; color: #002d72; margin-top: 0;
    margin-bottom: 15px; border-bottom: 2px solid #eee; padding-bottom: 10px;
}
.tour-hero-image img {
    width: 100%; height: auto; border-radius: 8px; margin-bottom: 20px;
}

/* Tabs & Sidebar (Logic cũ) */
.tour-tabs-wrapper { margin-top: 30px; }
.tabs-nav-detail {
    display: flex; border-bottom: 2px solid #002d72; margin-bottom: 20px;
}
.tab-link-detail {
    padding: 15px 25px; font-size: 1.1em; font-weight: 600; color: #555;
    background: #f8f8f8; border: 1px solid #eee; border-bottom: none;
    border-radius: 8px 8px 0 0; cursor: pointer; margin-right: 5px;
}

/* ==========================================================
   ITINERARY CONTENT: prevent overflow (TinyMCE)
   ========================================================== */
.itinerary-text {
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.itinerary-text img,
.itinerary-text video,
.itinerary-text iframe {
    max-width: 100% !important;
    height: auto !important;
}

.itinerary-text img {
    display: block;
    margin: 12px auto;
}

.itinerary-text table {
    width: 100% !important;
    max-width: 100% !important;
    display: block;
    overflow-x: auto;
}
.tab-link-detail.active {
    background: #002d72; color: white; border-color: #002d72;
}
.tab-pane-detail {
    display: none; padding: 20px; background: #fff;
    border: 1px solid #eee; border-top: none; border-radius: 0 0 8px 8px;
}
.tab-pane-detail.active { display: block; }
.booking-sidebar {
    background: #fff; border: 1px solid #ddd; border-radius: 8px;
    padding: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    /* FIX 3: Thêm Sticky */
    position: sticky;
    top: 20px; /* Khoảng cách từ trên cùng màn hình */
}
.booking-sidebar .price-header {
    text-align: center; border-bottom: 1px solid #eee; padding-bottom: 15px; margin-bottom: 15px;
}
.booking-sidebar .price-value {
    font-size: 1.8em; color: #ff6600; font-weight: bold;
}
.booking-form-wrapper h3 {
    text-align: center; color: #002d72; margin-bottom: 20px;
}
.booking-form-wrapper input {
    width: 100%; padding: 10px; margin-bottom: 10px;
    border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box;
}
.btn-submit-booking {
    width: 100%; padding: 12px; background-color: #ff6600;
    color: white; border: none; border-radius: 5px; font-weight: bold; cursor: pointer;
}
.btn-request-support {
    width: 100%; padding: 10px; margin-top: 10px; background: none;
    border: 1px solid #002d72; color: #002d72; border-radius: 5px; cursor: pointer;
}

@media (max-width: 992px) {
    .tour-listing-wrapper, .tour-detail-grid { flex-direction: column; }
    .tour-listing-sidebar, .tour-right-col { width: 100%; }
    /* Vô hiệu hóa sticky trên mobile */
    .booking-sidebar { position: static; }
}

/* ===========================================================
   === PHẦN 2: THÊM MỚI - GIAO DIỆN VTOURIST (BLUE THEME) ===
   =========================================================== */

/* Đè màu xanh cho sidebar cũ */
.booking-sidebar .price-value { color: #0056b3 !important; }
.btn-submit-booking { background-color: #0056b3 !important; }
.btn-submit-booking:hover { background-color: #004494 !important; }

/* 1. Blue Bar (Thanh ngang) */
.vt-blue-bar {
    background: #0056b3; /* Xanh đậm chủ đạo */
    color: #fff;
    padding: 12px 20px;
    border-radius: 5px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    font-weight: 600;
    margin-bottom: 25px;
    box-shadow: 0 4px 10px rgba(0, 86, 179, 0.2);
    margin-top: -10px;
}
.vt-blue-bar span i { margin-right: 8px; color: #80bdff; }

/* 2. Split Layout (Chia cột) */
.vt-split-container {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

/* Cột Trái: 4 ô vuông */
.vt-left-grid {
    width: 40%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.vt-box {
    border: 1px solid #cce5ff; /* Viền xanh rất nhạt */
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    background: #fff;
    transition: all 0.3s ease;
    /* FIX 2: Thêm hiệu ứng Hover */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.vt-box:hover {
    border-color: #0056b3; /* Border đậm hơn */
    box-shadow: 0 5px 15px rgba(0, 86, 179, 0.2); /* Shadow nổi bật */
    transform: translateY(-2px); /* Hiệu ứng lift */
    cursor: pointer;
}
.vt-box i {
    font-size: 28px;
    color: #0056b3; /* Icon xanh đậm */
    margin-bottom: 8px;
    display: block;
}
.vt-box strong {
    color: #0056b3;
    font-size: 13px;
    text-transform: uppercase;
    display: block; margin-bottom: 4px;
}
.vt-box p { margin: 0; font-size: 13px; color: #555; }

/* Cột Phải: Bảng chi tiết */
.vt-right-detail {
    width: 60%;
    border: 1px solid #cce5ff;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
}
.vt-header {
    margin: 0;
    padding: 12px 20px;
    background: #e3f2fd; /* Nền header xanh nhạt */
    color: #0056b3;
    font-size: 16px;
    font-weight: bold;
    border-bottom: 1px solid #cce5ff;
}
.vt-table {
    padding: 15px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
}
.vt-row { font-size: 13px; margin-bottom: 5px; }
.vt-lbl {
    color: #007bff; /* Label xanh tươi */
    font-weight: 600; margin-bottom: 2px;
}
.vt-lbl i { width: 18px; }
.vt-val { color: #333; font-weight: 500; }
.vt-val.highlight { color: #0056b3; font-weight: bold; }
.vt-val.phone-text { color: #d63384; font-weight: bold; line-height: 1.4; }

/* Footer trong bảng */
.vt-footer {
    margin-top: auto;
    background: #f8f9fa;
    border-top: 1px dashed #ddd;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.vt-price-block small { display: block; font-style: italic; color: #dc3545; font-size: 11px; }
.vt-price-line span { font-weight: 600; color: #0056b3; margin-right: 5px; }
.vt-price { color: #0056b3; font-size: 18px; }

.vt-btn-group { display: flex; gap: 8px; }
.vt-btn-book {
    background: #0056b3;
    color: #fff; border: none; padding: 8px 15px;
    border-radius: 4px; font-weight: bold; font-size: 12px; cursor: pointer;
}
.vt-btn-book:hover { background: #004494; }
.vt-btn-req {
    background: #fff; color: #0056b3; border: 1px solid #0056b3;
    padding: 8px 10px; border-radius: 4px; font-weight: bold; font-size: 12px; cursor: pointer;
}

/* ==========================================================
   FIX SIDEBAR CUỘN THEO TRANG (STICKY SIDEBAR - ĐÃ SỬA)
   ========================================================== */

/* 1. Cài đặt cho cái bảng Đăng Ký Tour */
.booking-sidebar.sticky-sidebar {
    /* Kích hoạt chế độ dính */
    position: -webkit-sticky; /* Safari */
    position: sticky;
    
    /* Khoảng cách từ mép trên màn hình xuống (đã tăng lên để tránh bị che) */
    top: 110px; 
    
    z-index: 100;
    
    /* Thuộc tính này quan trọng: sidebar chỉ cao bằng nội dung để có thể trượt */
    height: fit-content; 
    
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    
    transition: top 0.3s;
}