/* =================================================================== */
/*    CSS CHO TRANG CHI TIẾT TOUR - LAYOUT TIMELINE DỌC / NGANG        */
/*            (Dành cho cấu trúc HTML lồng nhau)                       */
/* =================================================================== */

/* === FONT & BIẾN MÀU CHÍNH === */
:root {
  --font-body: "Montserrat", sans-serif;
  --font-heading: "Lora", serif;
  --color-pink-brand: #e6007e; /* Màu hồng thương hiệu cho timeline */
  --color-text-dark: #333;
  --color-text-light: #555;
  --color-bg-content: #f7f7f7; /* Nền cho các box nội dung timeline */
  --color-border: #e9e9e9; /* Màu viền chung */
  --timeline-line-color: #dbeaff; /* Màu đường kẻ timeline */
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --border-radius-base: 8px;
}

/* === CÀI ĐẶT CHUNG & BỐ CỤC CHÍNH === */
body {
  font-family: var(--font-body);
  background-color: #fff;
  margin: 0;
  line-height: 1.6;
}
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  display: flex; /* Chuyển sang flexbox */
  gap: 30px; /* Khoảng cách giữa main content và sidebar */
  align-items: flex-start;
}
.tour-main-content {
  flex: 2;
}
.tour-sidebar {
  flex: 1;
  position: sticky;
  top: 20px; /* Sidebar dính khi cuộn */
}

/* === HERO, OVERVIEW, GALLERY === */
.tour-hero {
  height: 90vh; /* Chiều cao hero */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background-size: cover;
  background-position: center;
}
.tour-hero-content {
  max-width: 800px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.2); /* Lớp phủ nhẹ */
  backdrop-filter: blur(2px); /* Hiệu ứng mờ nền */
  border-radius: var(--border-radius-base);
}
.tour-hero h1 {
  font-family: var(--font-heading);
  font-size: 3.5rem; /* Kích thước tiêu đề hero */
  margin: 0;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}
.tour-hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-top: 1rem;
}
.tour-overview {
  display: flex;
  justify-content: space-around; /* Căn đều các mục overview */
  background: var(--color-bg-light);
  padding: 30px;
  border-radius: var(--border-radius-base);
  margin-bottom: 40px;
  border: 1px solid var(--color-border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}
.overview-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px;
  border-radius: var(--border-radius-base);
  transition: all 0.3s ease;
  background-color: rgba(255, 255, 255, 0.5);
}
.overview-item:hover {
  background-color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
.overview-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  line-height: 1;
  color: #2c5e1a;
  transition: transform 0.3s ease;
}
.overview-item:hover .overview-icon {
  transform: scale(1.1);
}
.overview-label {
  font-size: 0.95rem;
  color: var(--color-text-light);
  margin-bottom: 8px;
  font-weight: 500;
}
.overview-value {
  font-weight: 700;
  color: #2c5e1a;
  font-size: 1.2rem;
}
.tour-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 cột cho gallery */
  gap: 15px;
  margin-bottom: 40px;
}
.tour-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--border-radius-base);
  transition: transform 0.3s ease, opacity 0.3s ease; /* Hiệu ứng zoom nhẹ */
  cursor: zoom-in;
}
.tour-gallery img:hover {
  transform: scale(1.04);
  opacity: 0.8;
}

/* === LỊCH TRÌNH - ITINERARY SECTION (PHẦN QUAN TRỌNG NHẤT) === */
.tour-itinerary {
  margin-bottom: 40px;
}

.tour-itinerary h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.tour-itinerary h2::before {
  content: "📖";
  font-size: 1.8rem; /* Icon quyển sách */
  color: var(--color-pink-brand);
}

.timeline {
  position: relative;
}
/* Đường kẻ dọc dạng chấm */
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 8px;
  width: 2px;
  background-image: linear-gradient(
    var(--timeline-line-color) 4px,
    transparent 4px
  );
  background-size: 1px 8px;
}

/* Style cho từng mục ngày (bao gồm cả H3 và các thẻ P) */
.timeline-item {
  position: relative;
  padding-left: 35px;
  transition: transform 0.3s ease;
}
.timeline-item:hover {
  transform: translateX(5px);
}
.timeline-item:not(:last-child) {
  margin-bottom: 25px;
}
/* Reset style cho .timeline-content để áp dụng style mới cho timeline dọc */
.timeline-content {
  position: relative;
}

/* Style cho Tiêu đề Ngày (ví dụ: NGÀY 1 | ...) */
.timeline-content h3 {
  background-color: var(--color-pink-brand);
  color: #fff;
  padding: 12px 20px;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 8px;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}
.timeline-content h3:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
/* Marker cho Tiêu đề Ngày (<h3>) */
.timeline-content h3::before {
  content: "";
  position: absolute;
  left: -35px; /* Vị trí marker (padding timeline - vị trí đường kẻ) */
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background-color: #fff;
  border: 4px solid var(--color-pink-brand);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.8);
  z-index: 1;
  transition: transform 0.3s ease;
}
.timeline-content h3:hover::before {
  transform: translateY(-50%) scale(1.1);
}

/* Style cho từng mục chi tiết trong ngày (thẻ <p>) */
.timeline-content p {
  position: relative;
  background-color: var(--color-bg-content);
  padding: 15px 20px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin: 0;
  transition: all 0.3s ease;
}
.timeline-content p:hover {
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.timeline-content h3 + p {
  margin-top: 15px;
}
.timeline-content p + p {
  margin-top: 12px;
}
/* Marker cho mỗi sự kiện (thẻ <p>) */
.timeline-content p::before {
  content: "";
  position: absolute;
  left: -35px; /* Vị trí marker */
  top: 18px; /* Căn chỉnh với dòng text */
  width: 14px;
  height: 14px;
  background-color: var(--color-pink-brand);
  border: 3px solid #fff;
  border-radius: 50%;
  z-index: 1;
  transition: transform 0.3s ease;
}
.timeline-content p:hover::before {
  transform: scale(1.1);
}
/* Style cho phần thời gian (thẻ <strong>) */
.timeline-content p strong {
  flex: 0 0 60px;
  font-weight: 700;
  color: var(--color-text-dark);
}
.timeline-content p span {
  color: var(--color-text-light);
  font-size: 0.95rem;
  flex: 1;
}

/* === SIDEBAR & BOOKING WIDGET === */
.tour-sidebar {
  /* Đã được style ở trên */
}
.booking-widget {
  background-color: var(--color-bg-content);
  padding: 25px;
  border-radius: var(--border-radius-base);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow);
}
.price-section {
  text-align: center;
  margin-bottom: 20px;
}
.price-section .price-label {
  font-size: 0.9rem;
  color: var(--color-text-light);
}
.price-section .price-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-pink-brand);
}
.form-group {
  margin-bottom: 15px;
}
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
}
.form-group input[type="date"],
.form-group input[type="number"] {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 5px;
}
.btn-book-now {
  display: block;
  width: 100%;
  padding: 12px;
  background-color: var(--color-pink-brand);
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.btn-book-now:hover {
  background-color: #c30069; /* Darker pink */
}
.tour-includes-excludes {
  margin-top: 25px;
}
.tour-includes-excludes h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-text-dark);
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--color-border);
}
.tour-includes-excludes ul {
  list-style: none;
  padding-left: 20px; /* Chừa chỗ cho icon */
  margin-bottom: 15px;
}
.tour-includes-excludes li {
  position: relative;
  margin-bottom: 5px;
  font-size: 0.9rem;
}
.tour-includes-excludes .includes-list li::before {
  content: "✓";
  color: #6a994e; /* Màu xanh cho "bao gồm" */
  position: absolute;
  left: -18px;
}
.tour-includes-excludes .excludes-list li::before {
  content: "✗";
  color: #c1121f; /* Màu đỏ cho "không bao gồm" */
  position: absolute;
  left: -18px;
}

/* ===== STYLES FOR IMAGE MODAL GALLERY ===== */

/* Modal overlay */
.modal-viewer {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s;
}

/* Modal content container */
.modal-viewer .modal-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Large modal image */
#modal-image {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 5px;
  animation: zoomIn 0.3s;
}

/* Close button */
.close-modal-btn {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #fff;
  font-size: 45px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-modal-btn:hover {
  color: #bbb;
}

/* Navigation buttons */
.prev-btn,
.next-btn {
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 16px;
  color: white;
  font-weight: bold;
  font-size: 24px;
  transition: background-color 0.3s ease;
  user-select: none;
}

.prev-btn {
  left: 0;
  border-radius: 3px 0 0 3px;
}

.next-btn {
  right: 0;
  border-radius: 0 3px 3px 0;
}

.prev-btn:hover,
.next-btn:hover {
  background-color: rgba(0, 0, 0, 0.5);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes zoomIn {
  from {
    transform: scale(0.9);
  }
  to {
    transform: scale(1);
  }
}

/* === RESPONSIVE === */
@media (max-width: 992px) {
  .page-container {
    flex-direction: column; /* Stack sidebar dưới main content */
  }
  .tour-sidebar {
    position: static;
    width: 100%;
  }
  .overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tour-overview {
    padding: 25px;
  }
}
@media (max-width: 768px) {
  .timeline {
    padding-left: 15px; /* Giảm padding cho timeline trên mobile */
  }
  .timeline-content h3 {
    padding-left: 20px; /* Điều chỉnh padding tiêu đề ngày */
  }
  .timeline-content h3::before,
  .timeline-content p::before {
    left: -48px; /* Khôi phục giá trị left để căn chỉnh đúng với padding của timeline-item */
  }

  .timeline-content p {
    flex-direction: column; /* Thời gian và mô tả xếp chồng lên nhau */
    gap: 8px;
  }
  .timeline-content p strong {
    width: 100%;
  }
}
@media (max-width: 576px) {
  .overview-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .overview-item {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    padding: 15px;
  }

  .overview-icon {
    font-size: 2rem;
    margin-bottom: 0;
    margin-right: 15px;
  }

  .overview-text-wrapper {
    display: flex;
    flex-direction: column;
  }

  .overview-label {
    margin-bottom: 4px;
  }

  .tour-overview {
    padding: 20px;
  }

  .tour-itinerary h2 {
    font-size: 1.5rem;
  }

  .timeline-content h3 {
    font-size: 1rem;
    padding: 10px 15px;
  }
}

/* Tour Reviews Section Styling */
.tour-reviews {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid #e0e0e0;
}

.tour-reviews h2 {
  font-size: 2rem;
  font-family: "Lora", serif;
  margin-bottom: 2rem;
  color: #333;
}

.review-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.review-item {
  border-bottom: 1px solid #eee;
  padding-bottom: 1.5rem;
  transition: transform 0.3s ease;
}

.review-item:hover {
  transform: translateY(-2px);
}

.review-item:last-child {
  border-bottom: none;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.review-author {
  font-size: 1.1rem;
  font-weight: bold;
  color: #2c3e50;
}

.review-date {
  font-size: 0.9rem;
  color: #888;
}

.review-stars {
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
  color: #ffc107;
}

.review-stars .star-empty {
  color: #ccc;
}

.review-comment {
  line-height: 1.6;
  color: #555;
  margin: 0;
  font-style: italic;
  padding: 0.5rem 0;
}

.review-call-to-action p {
  margin: 0;
  font-size: 1.1rem;
  color: #890047;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .tour-reviews h2 {
    font-size: 1.5rem;
  }

  .review-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .review-date {
    font-size: 0.8rem;
  }
}
