/* Open trip listing */
.open-trips-section {
  padding: 2.5rem 0 3.5rem;
  background: #f4f6f9;
}

.open-trip-search {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 14px;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.75rem;
}

.open-trip-search__form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: stretch;
}

.open-trip-search__field {
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0 1rem;
  min-height: 48px;
  background: #f8f9fb;
  border: 1px solid #e3e8ef;
  border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.open-trip-search__field:focus-within {
  border-color: #001973;
  box-shadow: 0 0 0 3px rgba(0, 25, 115, 0.12);
  background: #fff;
}

.open-trip-search__field i {
  color: #6c757d;
  font-size: 1.1rem;
}

.open-trip-search__field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0.65rem 0;
  font-size: 1rem;
  outline: none;
}

.open-trip-search__submit {
  flex-shrink: 0;
  min-height: 48px;
  padding: 0 1.35rem;
  font-weight: 600;
  border-radius: 10px;
  background: #001973;
  border-color: #001973;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.open-trip-search__submit:hover {
  background: #0d47a1;
  border-color: #0d47a1;
}

.open-trip-search__chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eef1f4;
}

.open-trip-search__chips-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #6c757d;
  margin-right: 0.25rem;
}

.open-trip-search__chip {
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #001973;
  background: rgba(0, 25, 115, 0.07);
  border-radius: 50px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.open-trip-search__chip:hover {
  color: #001973;
  background: rgba(0, 25, 115, 0.14);
}

.open-trip-search__active {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.open-trip-search__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #001973;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 50px;
}

.open-trip-search__tag a {
  color: inherit;
  opacity: 0.75;
  line-height: 1;
}

.open-trip-search__tag a:hover {
  opacity: 1;
}

.open-trip-search__clear {
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 50px;
  padding: 0.4rem 0.9rem;
}

.open-trip-grid {
  margin-top: 0.25rem;
}

.open-trip-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.open-trip-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 28px rgba(0, 25, 115, 0.1);
  border-color: #d0d9e8;
}

.open-trip-card__media {
  position: relative;
  aspect-ratio: 5 / 3;
  overflow: hidden;
  background: #eef1f5;
}

.open-trip-card__media .image-carousel {
  min-height: 100%;
}

.open-trip-card__badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  max-width: calc(100% - 1.5rem);
  padding: 0.35rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #001973;
  background: #ffc107;
  border-radius: 50px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.open-trip-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1rem 1.05rem 1.1rem;
}

.open-trip-card__title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.open-trip-card__title a {
  color: #2c3e50;
  text-decoration: none;
}

.open-trip-card__title a:hover {
  color: #001973;
}

.open-trip-card__duration {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: #6c757d;
}

.open-trip-card__duration .bi-clock {
  color: #001973;
}

.open-trip-card__footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid #eef1f4;
}

.open-trip-card__price {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: #001973;
  line-height: 1.2;
}

.open-trip-card__price small {
  font-size: 0.78rem;
  font-weight: 500;
  color: #6c757d;
}

.open-trip-card__btn {
  width: 100%;
  font-weight: 600;
  border-radius: 10px;
  padding: 0.55rem 1rem;
  background: #001973;
  border-color: #001973;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.open-trip-card__btn:hover {
  background: #0d47a1;
  border-color: #0d47a1;
}

.open-trip-empty {
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: #fff;
  border-radius: 14px;
  border: 1px dashed #dee2e6;
}

.open-trip-empty i {
  font-size: 2rem;
  color: #001973;
  opacity: 0.5;
  margin-bottom: 0.75rem;
}

.open-trip-pagination {
  margin-top: 2.5rem;
}

.open-trip-pagination .pagination {
  margin-bottom: 0;
  gap: 0.35rem;
}

.open-trip-pagination .page-link {
  border: 1px solid #dee2e6;
  color: #001973;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.open-trip-pagination .page-link:hover {
  background: #f8f9fb;
  border-color: #001973;
  color: #0d47a1;
}

.open-trip-pagination .page-item.active .page-link {
  background: #001973;
  border-color: #001973;
  color: #fff;
}

@media (max-width: 576px) {
  .open-trip-search__submit {
    width: 100%;
    justify-content: center;
  }
}
