/* ========================================
   CHIANG MAI TOURS PAGE
   ======================================== */

/* ===== HERO SECTION ===== */
.cnx-hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.cnx-hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 40%, #2563eb 100%);
  z-index: 0;
}

.cnx-hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse at 70% 30%,
      rgba(59, 130, 246, 0.3) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse at 20% 80%,
      rgba(139, 92, 246, 0.15) 0%,
      transparent 50%
    );
  z-index: 1;
}

/* Decorative plane trail */
.cnx-hero-bg::after {
  content: "✈";
  position: absolute;
  top: 20%;
  right: 8%;
  font-size: 48px;
  opacity: 0.08;
  transform: rotate(-15deg);
  z-index: 1;
  animation: cnx-float 6s ease-in-out infinite;
}

@keyframes cnx-float {
  0%,
  100% {
    transform: rotate(-15deg) translateY(0px);
  }

  50% {
    transform: rotate(-15deg) translateY(-12px);
  }
}

.cnx-hero-overlay {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 1;
}

.cnx-hero-content {
  position: relative;
  z-index: 2;
  padding: 60px 0;
  text-align: center;
  color: #fff;
}

.cnx-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
  letter-spacing: 0.3px;
}

.cnx-hero-badge i {
  font-size: 16px;
  color: #60a5fa;
}

.cnx-hero-title {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}

.cnx-hero-highlight {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cnx-hero-desc {
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto 28px;
  opacity: 0.85;
  line-height: 1.7;
}

/* Stats Badges */
.cnx-hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  padding: 16px 32px;
  border-radius: 16px;
}

.cnx-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.cnx-stat-number {
  font-size: 28px;
  font-weight: 800;
  color: #fbbf24;
}

.cnx-stat-label {
  font-size: 15px;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cnx-stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255, 255, 255, 0.15);
}

/* ===== MAIN CONTENT ===== */
.cnx-main {
  padding-top: 50px;
}

/* ==================== Country Filter Pills ==================== */
.cnx-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 32px;
  padding: 0 8px;
}

.cnx-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 50px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
  white-space: nowrap;
  text-decoration: none;
}

.cnx-filter-pill:hover {
  border-color: #2563eb;
  color: #2563eb;
  background: #eff6ff;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.12);
  text-decoration: none;
}

.cnx-filter-pill.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.cnx-filter-pill.active:hover {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
  color: #fff;
  text-decoration: none;
}

.cnx-filter-pill i {
  font-size: 0.85rem;
}

.filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 50px;
  background: rgba(0, 0, 0, 0.08);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

.cnx-filter-pill.active .filter-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* ===== LIST HEADER ===== */
.cnx-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ==================== Price Sort Buttons ==================== */
.cnx-sort {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

.sort-label {
  font-size: 0.9rem;
  color: #777;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sort-label i {
  color: #999;
}

.cnx-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 50px;
  border: 1.5px solid #e0e0e0;
  background: #fff;
  color: #555;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
  white-space: nowrap;
}

.cnx-sort-btn:hover {
  border-color: #42a5f5;
  color: #1e88e5;
  background: #f0f8ff;
}

.cnx-sort-btn.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

/* ===== TOUR GRID (uses Bootstrap row/col) ===== */
.cnx-tour-grid {
  margin-bottom: 16px;
}

/* ===== NO TOURS STATE ===== */
.cnx-no-tours {
  text-align: center;
  padding: 80px 20px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

.cnx-no-tours-icon {
  width: 80px;
  height: 80px;
  background: #fef2f2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.cnx-no-tours-icon i {
  font-size: 32px;
  color: #ef4444;
}

.cnx-no-tours h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

.cnx-no-tours p {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 24px;
}

.cnx-no-tours-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cnx-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
}

.cnx-btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.cnx-btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.cnx-btn-outline {
  background: #fff;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.cnx-btn-outline:hover {
  background: #f8fafc;
  color: #1e293b;
  text-decoration: none;
  border-color: #cbd5e1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .cnx-hero {
    min-height: 350px;
  }

  .cnx-hero-content {
    padding: 40px 16px;
  }

  .cnx-hero-title {
    font-size: 28px;
  }

  .cnx-hero-desc {
    font-size: 15px;
  }

  .cnx-hero-stats {
    gap: 16px;
    padding: 12px 20px;
  }

  .cnx-stat-number {
    font-size: 26px;
  }

  .cnx-hero-bg::after {
    font-size: 32px;
    top: 10%;
    right: 4%;
  }

  .cnx-list-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .cnx-filters-wrap {
    position: relative;
    margin: 0 -12px 24px;
  }

  .cnx-filters-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), #ffffff);
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .cnx-filters-wrap.scrolled-end::after {
    opacity: 0;
  }

  .cnx-filters {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 4px 12px 16px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }

  .cnx-filters::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 480px) {
  .cnx-hero-title {
    font-size: 24px;
  }

  .cnx-hero-stats {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px 16px;
    width: 100%;
  }

  .cnx-stat {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  /* First divider (vertical between Tour and Country) */
  .cnx-hero-stats > div:nth-child(2) {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.15);
  }

  /* Second divider (horizontal to separate CNX) */
  .cnx-hero-stats > div:nth-child(4) {
    width: 60%;
    height: 1px;
    margin: 4px 0;
    background: rgba(255, 255, 255, 0.15);
  }

  /* Third stat (CNX) centered on its own row */
  .cnx-hero-stats > div:nth-child(5) {
    width: 100%;
    justify-content: center;
  }
}
