/* ============================================================
   PerunPath – Trips redesign  (list + detail)
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --tr-green-deep:   #0d2018;
  --tr-green-dark:   #1a4030;
  --tr-green-mid:    #1e6b45;
  --tr-green-light:  #22c55e;
  --tr-gold:         #c9920a;
  --tr-gold-light:   #f0b429;
  --tr-cream:        #f7f3ec;
  --tr-card:         #ffffff;
  --tr-border:       rgba(13, 32, 24, .08);
  --tr-shadow-sm:    0 1px 4px rgba(0,0,0,.06);
  --tr-shadow-md:    0 6px 20px rgba(0,0,0,.10);
  --tr-shadow-lg:    0 16px 40px rgba(0,0,0,.15);
  --tr-radius-sm:    8px;
  --tr-radius-md:    14px;
  --tr-radius-lg:    20px;
  --tr-font-head:    'Barlow Condensed', 'Arial Narrow', sans-serif;
  --tr-font-body:    'Inter', system-ui, sans-serif;
}

/* ============================================================
   PAGE WRAPPER
   ============================================================ */
.tl-page {
  background: var(--tr-cream);
  min-height: 100vh;
}

/* ============================================================
   HERO
   ============================================================ */
.tl-hero {
  position: relative;
  background:
    linear-gradient(160deg, #0d2018 0%, #1a4030 45%, #1e5c38 80%, #0d2018 100%);
  overflow: hidden;
  padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 9vw, 108px);
}

/* texture overlay */
.tl-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(34,197,94,.08) 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(201,146,10,.06) 0%, transparent 55%);
  pointer-events: none;
}

/* mountain silhouette */
.tl-hero::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 80px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath fill='%23f7f3ec' d='M0,80 L0,52 L60,30 L120,50 L200,10 L280,42 L360,18 L440,46 L520,8 L600,38 L680,20 L760,50 L840,14 L920,44 L1000,22 L1080,48 L1160,16 L1240,40 L1320,28 L1440,44 L1440,80 Z'/%3E%3C/svg%3E") bottom/cover no-repeat;
}

.tl-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
  text-align: center;
}

.tl-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.85);
  font-family: var(--tr-font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.tl-hero h1 {
  font-family: var(--tr-font-head);
  font-size: clamp(38px, 7vw, 72px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -.01em;
  line-height: 1.0;
  color: #fff;
  margin: 0 0 14px;
  text-shadow: 0 2px 20px rgba(0,0,0,.3);
}

.tl-hero h1 em {
  font-style: normal;
  color: var(--tr-gold-light);
}

.tl-hero-sub {
  font-family: var(--tr-font-body);
  font-size: clamp(15px, 1.8vw, 18px);
  color: rgba(255,255,255,.75);
  margin: 0 0 32px;
}

/* search bar */
.tl-search-form {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 4px 24px rgba(0,0,0,.20);
  padding: 6px 6px 6px 20px;
  gap: 8px;
  max-width: 560px;
  margin: 0 auto;
  transition: box-shadow .2s;
}
.tl-search-form:focus-within {
  box-shadow: 0 4px 24px rgba(0,0,0,.25), 0 0 0 3px rgba(201,146,10,.25);
}
.tl-search-icon {
  color: #9ca3af;
  flex-shrink: 0;
}
.tl-search-form input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--tr-font-body);
  font-size: 15px;
  color: #111;
  background: transparent;
  min-width: 0;
}
.tl-search-form input::placeholder { color: #9ca3af; }
.tl-search-clear {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: #6b7280;
  text-decoration: none;
  font-size: 18px;
  line-height: 1;
  transition: background .15s;
}
.tl-search-clear:hover { background: #f3f4f6; }
.tl-search-submit {
  flex-shrink: 0;
  background: var(--tr-gold);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-family: var(--tr-font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s;
  white-space: nowrap;
}
.tl-search-submit:hover { background: #b07d08; transform: scale(1.02); }

/* ============================================================
   FILTER BAR
   ============================================================ */
.tl-bar {
  background: #fff;
  border-bottom: 1px solid var(--tr-border);
  position: sticky;
  top: 72px; /* account for fixed navbar height */
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.tl-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px clamp(12px, 3vw, 32px);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.tl-bar-inner::-webkit-scrollbar { display: none; }

.tl-bar-sep {
  width: 1px;
  height: 24px;
  background: #e5e7eb;
  flex-shrink: 0;
}

.tl-bar-spacer { flex: 1; }

/* pill buttons */
.tl-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 999px;
  font-family: var(--tr-font-body);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: #4b5563;
  background: #f3f4f6;
  border: 1.5px solid transparent;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
  flex-shrink: 0;
}
.tl-pill:hover {
  background: #e5e7eb;
  color: #111;
}
.tl-pill.active {
  background: var(--tr-green-dark);
  color: #fff;
  border-color: var(--tr-green-dark);
  box-shadow: 0 2px 8px rgba(26,64,48,.25);
}
.tl-pill img { filter: brightness(0) saturate(0) invert(40%); }
.tl-pill.active img { filter: brightness(0) invert(1); }

/* clear filters */
.tl-pill-clear {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  color: #dc2626;
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s;
}
.tl-pill-clear:hover { background: #fee2e2; }

/* add trip CTA in bar */
.tl-btn-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  font-family: var(--tr-font-body);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, var(--tr-gold) 0%, var(--tr-gold-light) 100%);
  box-shadow: 0 2px 8px rgba(201,146,10,.30);
  white-space: nowrap;
  flex-shrink: 0;
  transition: box-shadow .15s, transform .1s;
}
.tl-btn-add:hover {
  box-shadow: 0 4px 16px rgba(201,146,10,.45);
  transform: translateY(-1px);
}

/* ============================================================
   CONTENT WRAPPER
   ============================================================ */
.tl-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px clamp(12px, 3vw, 32px) 56px;
}

/* results header */
.tl-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.tl-results-count {
  font-family: var(--tr-font-body);
  font-size: 14px;
  color: #6b7280;
}
.tl-results-count strong {
  font-size: 18px;
  font-weight: 800;
  color: var(--tr-green-dark);
}
.tl-search-label {
  display: inline-block;
  background: var(--tr-cream);
  border: 1px solid var(--tr-border);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 13px;
  color: #374151;
  margin-left: 6px;
  font-style: italic;
}

/* ============================================================
   TRIP GRID
   ============================================================ */
.tl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* ============================================================
   TRIP CARD
   ============================================================ */
.tc {
  background: var(--tr-card);
  border-radius: var(--tr-radius-lg);
  overflow: hidden;
  border: 1px solid var(--tr-border);
  box-shadow: var(--tr-shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.tc:hover {
  transform: translateY(-5px);
  box-shadow: var(--tr-shadow-lg);
  border-color: rgba(13,32,24,.16);
}

/* --- image area --- */
.tc-img {
  position: relative;
  display: block;
  height: 195px;
  overflow: hidden;
  background: var(--tr-green-dark);
  text-decoration: none;
  flex-shrink: 0;
}
.tc-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.tc:hover .tc-img img { transform: scale(1.04); }

/* placeholder (no photo) */
.tc-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.tc-placeholder svg { opacity: .28; }

/* style-specific placeholder gradients */
.tc-placeholder--trekking { background: linear-gradient(150deg, #2d6a4f, #0d2018); }
.tc-placeholder--bike     { background: linear-gradient(150deg, #92400e, #1c0a00); }
.tc-placeholder--water    { background: linear-gradient(150deg, #075985, #0c1a2e); }
.tc-placeholder--urbex    { background: linear-gradient(150deg, #374151, #111827); }
.tc-placeholder--camping  { background: linear-gradient(150deg, #166534, #052e16); }
.tc-placeholder--other    { background: linear-gradient(150deg, #4b5563, #1f2937); }
.tc-placeholder--default  { background: linear-gradient(150deg, #1a4030, #0d2018); }

/* gradient scrim at bottom of photo */
.tc-img::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 90px;
  background: linear-gradient(to top, rgba(0,0,0,.55) 0%, transparent 100%);
  pointer-events: none;
}

/* audience badge – top right */
.tc-audience {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 2;
  font-family: var(--tr-font-body);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  white-space: nowrap;
  text-shadow: none;
}
.tc-audience--everyone  { background: rgba(255,255,255,.88); color: #374151; }
.tc-audience--female    { background: rgba(236,72,153,.88); color: #fff; }
.tc-audience--male      { background: rgba(37,99,235,.88); color: #fff; }
.tc-audience--accessible{ background: rgba(124,58,237,.88); color: #fff; }

/* date strip – bottom of photo */
.tc-date-strip {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 2;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tc-date {
  display: flex; align-items: center; gap: 5px;
  font-family: var(--tr-font-body);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.93);
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.tc-status-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.tc-status-active   { background: rgba(34,197,94,.85); color: #fff; }
.tc-status-closed   { background: rgba(239,68,68,.85); color: #fff; }
.tc-status-archived { background: rgba(107,114,128,.75); color: #fff; }

/* --- card body --- */
.tc-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}

/* style pill */
.tc-style {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--tr-font-body);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 3px 10px;
  border-radius: 999px;
  align-self: flex-start;
}
.tc-style--trekking { background: #dcfce7; color: #166534; }
.tc-style--bike     { background: #ffedd5; color: #9a3412; }
.tc-style--water    { background: #dbeafe; color: #1e40af; }
.tc-style--urbex    { background: #f1f5f9; color: #334155; }
.tc-style--camping  { background: #d1fae5; color: #065f46; }
.tc-style--other    { background: #f3f4f6; color: #4b5563; }
.tc-style img { width: 14px; height: 14px; }

/* title */
.tc-title {
  font-family: var(--tr-font-head);
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.15;
  margin: 0;
  color: #0d2018;
}
.tc-title a {
  text-decoration: none;
  color: inherit;
  transition: color .15s;
}
.tc-title a:hover { color: var(--tr-green-mid); }

/* location */
.tc-location {
  display: flex; align-items: center; gap: 5px;
  font-family: var(--tr-font-body);
  font-size: 13px;
  color: #6b7280;
  min-width: 0;
}
.tc-location span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* participants bar */
.tc-spots {
  display: flex; align-items: center; gap: 8px;
}
.tc-spots-track {
  flex: 1;
  height: 6px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}
.tc-spots-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--tr-green-mid), var(--tr-green-light));
  transition: width .4s ease;
}
.tc-spots-fill--full { background: linear-gradient(90deg, #dc2626, #f87171); }
.tc-spots-fill--almost { background: linear-gradient(90deg, #d97706, #fbbf24); }
.tc-spots-text {
  font-family: var(--tr-font-body);
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
  flex-shrink: 0;
}

/* bottom row: organizer */
.tc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--tr-border);
  margin-top: auto;
}
.tc-organizer {
  display: flex; align-items: center; gap: 7px;
  min-width: 0;
}
.tc-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--tr-green-mid), var(--tr-green-dark));
  color: #fff;
  font-family: var(--tr-font-body);
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tc-organizer-name {
  font-family: var(--tr-font-body);
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tc-cta {
  font-family: var(--tr-font-body);
  font-size: 12px;
  font-weight: 700;
  color: var(--tr-green-mid);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color .15s;
}
.tc-cta:hover { color: var(--tr-green-dark); }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.tl-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 72px 24px;
  color: #6b7280;
}
.tl-empty-icon {
  margin: 0 auto 20px;
  width: 80px; height: 80px;
  background: #f0f0ea;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.tl-empty h3 {
  font-family: var(--tr-font-head);
  font-size: 26px;
  font-weight: 700;
  text-transform: uppercase;
  color: #374151;
  margin: 0 0 8px;
}
.tl-empty p { font-size: 15px; margin: 0 0 20px; }
.tl-empty-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  background: var(--tr-green-dark);
  color: #fff;
  font-family: var(--tr-font-body);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: background .15s, transform .1s;
}
.tl-empty-cta:hover { background: var(--tr-green-mid); transform: translateY(-1px); }

/* ============================================================
   ADS IN FEED
   ============================================================ */
.tl-grid .ad-in-feed { border-radius: var(--tr-radius-lg); overflow: hidden; }

/* ============================================================
   TRIP DETAIL HERO  (kept from original, slightly polished)
   ============================================================ */
.trip-detail-hero, .pp-trip-detail-hero {
  position: relative;
  border-radius: var(--tr-radius-lg);
  overflow: hidden;
  min-height: 340px;
  margin-bottom: 28px;
  background: linear-gradient(135deg, #0f2a1e, #2a5a42);
  color: #f5f2e8;
}
.trip-detail-hero::after, .pp-trip-detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,26,20,0) 40%, rgba(15,26,20,.80) 100%);
  pointer-events: none;
}
.trip-detail-hero__body, .pp-trip-detail-hero__body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: clamp(20px, 3vw, 44px);
  z-index: 2;
}
.trip-detail-hero h1, .pp-trip-detail-hero h1 {
  font-family: var(--tr-font-head);
  font-size: clamp(28px, 4.5vw, 52px);
  font-weight: 700;
  text-transform: uppercase;
  margin: 0 0 8px;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.45);
}

/* ===== Detail body sections ===== */
.trip-section, .pp-trip-section {
  background: #fff;
  border: 1px solid var(--tr-border);
  border-radius: var(--tr-radius-md);
  padding: clamp(16px, 2.4vw, 28px);
  margin-bottom: 20px;
  box-shadow: var(--tr-shadow-sm);
}
.trip-section h2, .pp-trip-section h2 {
  font-family: var(--tr-font-head);
  font-size: 26px;
  font-weight: 700;
  color: #0f1a14;
  margin: 0 0 14px;
  text-transform: uppercase;
}

/* ===== CTA row ===== */
.trip-cta-row, .pp-trip-cta-row {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .tl-hero::after { height: 40px; }
  .tl-grid { grid-template-columns: 1fr; gap: 14px; }
  .tl-results-header { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (max-width: 480px) {
  .tl-search-submit span { display: none; }
  .tc-img { height: 170px; }
  .tl-hero h1 { font-size: 34px; }
}

@media (min-width: 640px) and (max-width: 900px) {
  .tl-grid { grid-template-columns: repeat(2, 1fr); }
}
