/*
 * TOUR LISTING PAGE STYLES
 * Thiết kế dành riêng cho trang danh sách tour (ví dụ: tour leo núi).
 */

/* === BIẾN MÀU SẮC & FONT === */
:root {
  /* Màu sắc lấy cảm hứng từ thiên nhiên: đá, cây, bầu trời */
  --color-primary: #2c3e50; /* Xanh đen (Midnight Blue) */
  --color-secondary: #e67e22; /* Cam cà rốt (Carrot Orange) */
  --color-text: #34495e; /* Xanh xám đậm (Wet Asphalt) */
  --color-text-light: #7f8c8d; /* Xám bạc (Silver) */
  --color-background: #ecf0f1; /* Xám rất nhạt (Clouds) */
  --color-surface: #ffffff; /* Trắng */
  --color-border: #dfe6e9; /* Xám nhạt cho viền */

  /* Font chữ */
  --font-body: "Roboto", sans-serif;
  --font-heading: "Montserrat", sans-serif;

  /* Các giá trị khác */
  --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.06);
  --shadow-strong: 0 8px 25px rgba(44, 62, 80, 0.15);
  --border-radius: 12px;
  --transition-fast: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === CÀI ĐẶT CHUNG === */
body {
  font-family: var(--font-body);
  background-color: var(--color-background);
  color: var(--color-text);
  line-height: 1.6;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 24px;
}

/* === HEADER CỦA TRANG === */
.tour-list-header {
  color: var(--color-surface);
  text-align: center;
  padding: 100px 20px;
}

.tour-list-header h1 {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 700;
  margin: 0;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.tour-list-header p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 1rem auto 0;
  opacity: 0.9;
}

.btn-light {
  display: inline-block;
  padding: 12px 24px;
  background-color: rgb(255, 255, 255);
  color:#34495e;
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--border-radius);
  transition: var(--transition-fast);
}

/* === KHU VỰC BỘ LỌC (Filter Bar) === */
.filter-bar {
  padding: 2px 0; /* Tăng padding để dễ nhìn hơn khi có blur */
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 50px; /* Thanh filter sẽ dính ở trên cùng khi cuộn */
  z-index: 10;
  /* Làm cho nền trong suốt và mờ */
  background-color: rgba(
    236,
    240,
    241,
    0.8
  ); /* Màu --color-background với 80% độ trong suốt */
  backdrop-filter: blur(8px); /* Độ mờ, bạn có thể điều chỉnh giá trị này */
  -webkit-backdrop-filter: blur(8px); /* Hỗ trợ cho Safari */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Giữ lại một chút shadow nhẹ */
}

.filter-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.filter-controls label {
  font-weight: 700;
  color: var(--color-primary);
}

.filter-controls .filter-button {
  padding: 8px 16px;
  border: 1px solid var(--color-border);
  border-radius: 50px;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 500;
  transition: var(--transition-fast);
}

.filter-controls .filter-button:hover,
.filter-controls .filter-button.active {
  background-color: var(--color-primary);
  color: var(--color-surface);
  border-color: var(--color-primary);
}

/* === LƯỚI DANH SÁCH TOUR === */
.tour-grid-container {
  padding: 80px 0;
}

.tour-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 40px;
}

/* === THẺ TOUR (Tour Card) === */
.tour-card {
  background-color: var(--color-surface);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
}
.tour-card-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Cho phép phần content này lấp đầy không gian còn lại trong .tour-card */
  padding: 20px; /* Tăng padding cho thoáng hơn */
  /* Bỏ margin cũ không cần thiết: margin: 5px 5px 0 0; */
}

.tour-card-content h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 10px 0; /* Giảm margin dưới một chút */
  line-height: 1.3;
}

.tour-card-content .tour-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px; /* Khoảng cách giữa các mục thông tin (dọc và ngang) */
  font-size: 0.85rem; /* Kích thước font nhỏ hơn một chút */
  color: var(--color-text-light);
  margin-bottom: 15px;
}

.tour-card-content .tour-info span strong {
  color: var(--color-text); /* Làm nổi bật phần label */
}

.tour-card-content p {
  /* Phần tóm tắt */
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1; /* Quan trọng: Giúp đẩy nút bấm xuống dưới cùng */
}

.tour-card-content .btn--primary {
  margin-top: auto; /* Đảm bảo nút luôn ở cuối cùng của .tour-card-content */
  padding: 10px 20px;
  text-align: center;
  background-color: var(--color-primary);
  border-radius: 10px;
  width: 100%;
  color: var(--color-surface);
}

.tour-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-strong);
}

.tour-card__image-container {
  position: relative;
  height: 240px;
}

.tour-card img {
  display: block;
  width: 100%;
  height: 60% !important;
  object-fit: cover;
  transition: transform 0.4s ease;
  border-radius: 7px;
}

.tour-card:hover img {
  transform: scale(1.05);
}

.tour-card__difficulty-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background-color: rgba(44, 62, 80, 0.85);
  color: var(--color-surface);
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  backdrop-filter: blur(5px);
}

.tour-card__content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Đảm bảo content luôn co giãn để đẩy footer xuống */
}

.tour-card__title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 12px 0;
  min-height: 50px; /* Dành chỗ cho 2 dòng tiêu đề */
}

.tour-card__summary {
  color: var(--color-text-light);
  font-size: 0.95rem;
  margin-bottom: 20px;
  flex-grow: 1; /* Đẩy footer xuống dưới cùng */
}

.tour-card__footer {
  border-top: 1px solid var(--color-border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tour-card__duration {
  font-weight: 500;
  color: var(--color-text-light);
}

.tour-card__details-btn {
  display: inline-block;
  padding: 10px 24px;
  background-color: var(--color-secondary);
  color: var(--color-surface);
  text-decoration: none;
  font-weight: 700;
  border-radius: 50px;
  transition: var(--transition-fast);
}

.tour-card__details-btn:hover {
  background-color: #d35400; /* Màu cam đậm hơn khi hover */
  transform: scale(1.05);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .tour-list-header h1 {
    font-size: 2.5rem;
  }
  .filter-controls {
    flex-wrap: wrap;
  }
  .tour-grid {
    grid-template-columns: 1fr;
  }
}
