/* ============================================================
   PerunPath – Nowoczesny Redesign Wycieczek i Tripów (V3)
   Zoptymalizowany pod Mobile & Desktop (Light & Dark Theme)
   ============================================================ */

:root {
  --tp-bg-surface: var(--bg-surface, #ffffff);
  --tp-bg-body: var(--bg-body, #f4f7f5);
  --tp-text-main: var(--text-main, #111827);
  --tp-text-muted: var(--text-muted, #6b7280);
  --tp-border: var(--border-main, rgba(0, 0, 0, 0.08));
  --tp-primary: var(--color-primary, #10b981);
  --tp-primary-hover: #059669;
  --tp-primary-subtle: rgba(16, 185, 129, 0.12);
  --tp-gold: #f59e0b;
  --tp-card-bg: var(--bg-surface, #ffffff);
  --tp-radius-sm: 10px;
  --tp-radius-md: 16px;
  --tp-radius-lg: 22px;
  --tp-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
  --tp-shadow-hover: 0 14px 28px -4px rgba(0, 0, 0, 0.12), 0 4px 10px -2px rgba(0, 0, 0, 0.06);
  --tp-font-head: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --tp-font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
  --tp-bg-surface: #15221b;
  --tp-bg-body: #0c1410;
  --tp-text-main: #f3f4f6;
  --tp-text-muted: #9ca3af;
  --tp-border: rgba(255, 255, 255, 0.09);
  --tp-card-bg: #182820;
  --tp-primary-subtle: rgba(16, 185, 129, 0.18);
  --tp-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.35);
  --tp-shadow-hover: 0 14px 32px -4px rgba(0, 0, 0, 0.55);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.tl-hero {
  position: relative;
  background: linear-gradient(135deg, #091a12 0%, #122b1e 50%, #0d2017 100%);
  border-bottom: 1px solid var(--tp-border);
  padding: clamp(36px, 6vw, 64px) 0 clamp(40px, 7vw, 72px);
  overflow: hidden;
}

.tl-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 15% 30%, rgba(16, 185, 129, 0.15) 0%, transparent 55%),
    radial-gradient(circle at 85% 70%, rgba(245, 158, 11, 0.10) 0%, transparent 50%);
  pointer-events: none;
}

.tl-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.tl-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
  backdrop-filter: blur(8px);
}

.tl-hero h1 {
  font-family: var(--tp-font-head);
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: #ffffff;
  margin: 0 0 12px;
}

.tl-hero h1 em {
  font-style: normal;
  color: #fbbf24;
}

.tl-hero-sub {
  font-size: clamp(14.5px, 1.8vw, 17px);
  color: rgba(255, 255, 255, 0.8);
  max-width: 680px;
  margin: 0 auto 26px;
  line-height: 1.5;
}

.tl-hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tl-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #10b981;
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.tl-btn-primary:hover {
  background: #059669;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.tl-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 12px;
  text-decoration: none;
  backdrop-filter: blur(6px);
  transition: all 0.2s ease;
}

.tl-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

/* ============================================================
   SEARCH & FILTER BAR
   ============================================================ */
.tl-filter-section {
  background: var(--tp-bg-surface);
  border-bottom: 1px solid var(--tp-border);
  position: sticky;
  top: 60px;
  z-index: 90;
  box-shadow: var(--tp-shadow);
  padding: 14px 0;
  backdrop-filter: blur(12px);
}

.tl-filter-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tl-search-bar {
  display: flex;
  align-items: center;
  background: var(--tp-bg-body);
  border: 1.5px solid var(--tp-border);
  border-radius: 14px;
  padding: 4px 6px 4px 14px;
  gap: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tl-search-bar:focus-within {
  border-color: var(--tp-primary);
  box-shadow: 0 0 0 3px var(--tp-primary-subtle);
}

.tl-search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--tp-text-main);
  font-size: 14.5px;
  outline: none;
  padding: 6px 0;
}

.tl-search-bar input::placeholder {
  color: var(--tp-text-muted);
}

.tl-search-btn {
  background: var(--tp-primary);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.15s;
}

.tl-search-btn:hover {
  background: var(--tp-primary-hover);
}

.tl-pills-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.tl-pills-row::-webkit-scrollbar {
  display: none;
}

.tl-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--tp-text-muted);
  background: var(--tp-bg-body);
  border: 1px solid var(--tp-border);
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.tl-pill:hover {
  background: var(--tp-primary-subtle);
  color: var(--tp-text-main);
  border-color: var(--tp-primary);
}

.tl-pill.active {
  background: var(--tp-primary);
  color: #ffffff;
  border-color: var(--tp-primary);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

/* ============================================================
   GRID OF TRIPS
   ============================================================ */
.tl-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.tl-header-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.tl-count-label {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--tp-text-muted);
}

.tl-count-label strong {
  color: var(--tp-text-main);
  font-size: 16px;
}

.tl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}

@media (max-width: 640px) {
  .tl-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ============================================================
   TRIP CARD (MODERN OUTDOOR)
   ============================================================ */
.tc {
  background: var(--tp-card-bg);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--tp-shadow);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.tc:hover {
  transform: translateY(-4px);
  box-shadow: var(--tp-shadow-hover);
  border-color: rgba(16, 185, 129, 0.4);
}

.tc-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #1f2937;
  overflow: hidden;
  display: block;
}

.tc-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.tc:hover .tc-cover img {
  transform: scale(1.04);
}

.tc-cover-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.65) 100%);
  pointer-events: none;
}

/* Date capsule */
.tc-date-capsule {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(8px);
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Badges on media */
.tc-style-chip {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--tp-primary);
  color: #fff;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.tc-bot-badge {
  position: absolute;
  bottom: 10px;
  left: 12px;
  background: rgba(6, 78, 59, 0.9);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 8px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
  backdrop-filter: blur(6px);
}

/* Card Body */
.tc-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tc-location-strip {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--tp-text-muted);
  margin-bottom: 6px;
}

.tc-location-strip svg {
  color: var(--tp-primary);
  flex-shrink: 0;
}

.tc-title {
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 8px;
}

.tc-title a {
  color: var(--tp-text-main);
  text-decoration: none;
  transition: color 0.15s;
}

.tc-title a:hover {
  color: var(--tp-primary);
}

.tc-desc {
  font-size: 13.5px;
  color: var(--tp-text-muted);
  line-height: 1.45;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tc-tags-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tc-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--tp-bg-body);
  border: 1px solid var(--tp-border);
  color: var(--tp-text-muted);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

/* Card Footer */
.tc-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--tp-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tc-organizer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tc-organizer-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--tp-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.tc-organizer-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--tp-text-main);
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tc-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--tp-primary);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.tc-cta-btn:hover {
  color: var(--tp-primary-hover);
  transform: translateX(3px);
}

/* ============================================================
   TRIP DETAIL PAGE
   ============================================================ */
.td-hero {
  position: relative;
  width: 100%;
  min-height: 280px;
  max-height: 420px;
  background: #0f172a;
  border-radius: var(--tp-radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-end;
  border: 1px solid var(--tp-border);
}

.td-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.td-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(10,20,15,0.88) 100%);
  z-index: 1;
}

.td-hero-content {
  position: relative;
  z-index: 2;
  padding: 28px 24px;
  color: #ffffff;
  width: 100%;
}

.td-hero-title {
  font-family: var(--tp-font-head);
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 10px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.td-hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.9);
}

.td-bot-alert {
  background: var(--tp-primary-subtle);
  border: 1.5px solid var(--tp-primary);
  border-radius: var(--tp-radius-md);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.td-bot-alert-title {
  font-weight: 700;
  color: var(--tp-primary-hover);
  font-size: 15px;
  margin-bottom: 2px;
}

.td-bot-alert-desc {
  font-size: 13px;
  color: var(--tp-text-muted);
}

.td-external-btn {
  background: var(--tp-primary);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
  transition: all 0.15s;
}

.td-external-btn:hover {
  background: var(--tp-primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
}

.td-quick-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.td-spec-box {
  background: var(--tp-bg-surface);
  border: 1px solid var(--tp-border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.td-spec-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--tp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.td-spec-val {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--tp-text-main);
}

.td-markdown-content {
  color: var(--tp-text-main);
  font-size: 15.5px;
  line-height: 1.7;
}

.td-markdown-content h2, .td-markdown-content h3 {
  color: var(--tp-text-main);
  font-weight: 800;
  margin: 24px 0 12px;
}

.td-markdown-content ul, .td-markdown-content ol {
  padding-left: 20px;
  margin-bottom: 18px;
}

.td-markdown-content li {
  margin-bottom: 6px;
}

/* Sticky Mobile CTA Bar */
.td-mobile-cta-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--tp-bg-surface);
  border-top: 1px solid var(--tp-border);
  padding: 12px 16px;
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(16px);
}

@media (max-width: 768px) {
  .td-mobile-cta-bar {
    display: flex;
  }
}
