:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --brand-blue: #0b5cab;
  --brand-blue-dark: #094c8f;
  --brand-blue-soft: #eef5ff;
  --accent: #0f766e;
  --accent-soft: #e6fffb;
  --border: #e5e7eb;
  --shadow: 0 14px 30px rgba(17, 24, 39, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background: #ffffff;
}

.page {
  max-width: 1160px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.hero {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.1rem 1rem 0.8rem;
  margin-bottom: 1.1rem;
  box-shadow: var(--shadow);
}

.hero h1 {
  margin: 0.3rem 0 0.25rem;
  letter-spacing: -0.02em;
  font-size: clamp(1.9rem, 4.4vw, 2.7rem);
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: var(--accent);
  font-size: 0.76rem;
}

#status {
  margin: 0.2rem 0 0.9rem;
  color: var(--muted);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.controls input[type="search"],
.controls select {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.58rem 0.82rem;
  background: #fff;
  min-height: 40px;
}

.controls input[type="search"] {
  min-width: 230px;
}

.controls label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
}

#sync-button,
.pager button {
  border: 1px solid var(--brand-blue);
  background: #ffffff;
  color: var(--brand-blue);
  border-radius: 8px;
  padding: 0.5rem 0.78rem;
  cursor: pointer;
  font-weight: 600;
}

#sync-button:hover,
.pager button:hover {
  background: var(--brand-blue-soft);
}

.trip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.filter-groups {
  margin: 0 0 0.9rem;
  display: grid;
  gap: 0.55rem;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.filter-label {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  min-width: 56px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.filter-chip {
  border: 1px solid var(--border);
  background: #ffffff;
  color: #374151;
  border-radius: 999px;
  padding: 0.26rem 0.62rem;
  font-size: 0.82rem;
  cursor: pointer;
}

.filter-chip.is-active {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
  background: var(--brand-blue-soft);
}

.trip-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.trip-image {
  display: block;
  width: 100%;
  height: 232px;
  object-fit: cover;
  background: #e5e7eb;
}

.trip-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  margin: 0;
  z-index: 2;
  border-radius: 999px;
  padding: 0.26rem 0.62rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(17, 24, 39, 0.18);
}

.trip-badge.is-sold-out {
  background: rgba(185, 28, 28, 0.92);
}

.trip-badge.is-low-spots {
  background: rgba(180, 83, 9, 0.92);
}

.trip-card-body {
  padding: 0.72rem 0.85rem 0.85rem;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.trip-topline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  margin: 0 0 0.35rem;
}

.trip-price-chip {
  display: inline-flex;
  align-items: center;
  margin: 0;
  font-size: 0.86rem;
  font-weight: 500;
  color: #374151;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

.trip-title {
  margin: 0 0 0.24rem;
  font-size: clamp(1.05rem, 1.8vw, 1.22rem);
  line-height: 1.25;
}

.trip-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.trip-location {
  margin-bottom: 0.5rem;
}

.trip-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.trip-facts .trip-meta {
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.58rem;
}

.trip-dates {
  margin: 0;
  color: #374151;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.86rem;
}

.trip-date-icon {
  width: 0.82rem;
  height: 0.82rem;
  display: inline-block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='16' rx='2.5'/%3E%3Cpath d='M8 2.8v3.5M16 2.8v3.5M3 9.5h18'/%3E%3C/svg%3E");
}

.trip-description {
  margin: 0 0 0.75rem;
  line-height: 1.47;
  color: #374151;
}

.trip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
}

.trip-details-link,
.trip-link {
  text-decoration: none;
  font-weight: 600;
  padding: 0.38rem 0.7rem;
  font-size: 0.88rem;
  border-radius: 7px;
  border: 1px solid var(--brand-blue);
  color: var(--brand-blue);
  background: #ffffff;
}

.trip-link {
  background: var(--brand-blue);
  color: #ffffff;
  border-color: var(--brand-blue);
}

.trip-link:hover {
  background: var(--brand-blue-dark);
  border-color: var(--brand-blue-dark);
}

.trip-details-link:hover {
  background: var(--brand-blue-soft);
}

.pager {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.pager button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.detail-card {
  max-width: 900px;
  margin-top: 0.45rem;
  display: block;
  padding: 0 1.1rem 1.15rem;
}

.detail-card .trip-image {
  width: calc(100% + 2.2rem);
  margin: 0 -1.1rem 1rem;
  height: 320px;
}

.detail-card section {
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
}

.detail-card h2 {
  margin: 0 0 0.55rem;
  font-size: 1.12rem;
}

.detail-header {
  padding-bottom: 0.4rem;
}

.detail-location {
  margin-bottom: 0.65rem;
}

.detail-facts {
  margin-bottom: 0.7rem;
}

.detail-section {
  background: #fcfcfd;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.8rem 0.85rem;
}

.detail-list,
.itinerary-list {
  margin: 0;
  padding-left: 1.1rem;
  color: #374151;
}

.priced-list li p {
  margin: 0.2rem 0;
}

.price-inline {
  margin-left: 0.4rem;
  color: #0f766e;
  font-weight: 700;
}

.detail-list li,
.itinerary-list li {
  margin-bottom: 0.5rem;
}

.itinerary-list h3 {
  margin: 0 0 0.2rem;
  font-size: 0.98rem;
}

.itinerary-list p {
  margin: 0;
  line-height: 1.45;
  color: #4b5563;
}

.itinerary-photo {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin: 0 0 0.45rem;
  object-fit: cover;
}

.detail-story {
  margin-bottom: 1rem;
}

.detail-story h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.rich-content {
  color: #374151;
  line-height: 1.6;
}

.rich-content p {
  margin: 0 0 0.75rem;
}

.rich-content p:last-child {
  margin-bottom: 0;
}

.rich-content a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.rich-content a:hover {
  text-decoration: underline;
}

.rich-content ul,
.rich-content ol {
  margin: 0 0 0.75rem;
  padding-left: 1.15rem;
}

@media (max-width: 700px) {
  .controls input[type="search"] {
    min-width: 100%;
  }

  .hero {
    padding: 1rem 0.85rem 0.75rem;
  }
}
