/* card hover transitions already in main.css — this file kept for compat */


/* ── ARCHIVE TOOLBAR (result count + view switcher) ────────────── */
.te-archive-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* ── VIEW SWITCHER BUTTONS ─────────────────────────────────────── */
.te-view-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--te-bg, #F4F6F9);
  border: 1px solid var(--te-border, #E2E8F0);
  border-radius: 10px;
  padding: 4px;
}
.te-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--te-muted, #64748B);
  text-decoration: none;
  transition: background .18s, color .18s;
  white-space: nowrap;
}
.te-view-btn:hover {
  background: rgba(0,0,0,.05);
  color: var(--te-text, #1A1A2E);
}
.te-view-btn--active {
  background: #fff;
  color: var(--te-trek, #E8401B);
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
@media(max-width:480px){
  .te-view-btn span { display: none; }
  .te-view-btn { padding: 7px 10px; }
}

/* ── GRID LAYOUT (Design 1 — default 3-col grid) ───────────────── */
/* te-grid-3 is already defined in main.css */

/* ── LIST LAYOUT (Design 2 — single-column list) ───────────────── */
.te-grid-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── COMPACT LAYOUT (Design 3 — dense 2-col list) ──────────────── */
.te-grid-compact {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media(max-width:600px){
  .te-grid-compact { grid-template-columns: 1fr; }
}

/* ── LIST CARD ─────────────────────────────────────── */
.te-trek-card--list {
  display: flex;
  flex-direction: row;
  min-height: 160px;
  column-span: all;
}
.te-lcard-thumb {
  flex-shrink: 0;
  width: 220px;
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl,16px) 0 0 var(--r-xl,16px);
}
.te-lcard-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease;
}
.te-trek-card--list:hover .te-lcard-thumb img { transform: scale(1.05); }
.te-lcard-body {
  flex: 1;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
@media(max-width:600px){
  .te-trek-card--list { flex-direction: column; }
  .te-lcard-thumb { width: 100%; height: 180px; border-radius: var(--r-xl,16px) var(--r-xl,16px) 0 0; }
}

/* ── COMPACT CARD ──────────────────────────────────── */
.te-trek-card--compact {
  min-height: unset;
}

/*
 * FIX: .te-card-diff-badge is globally position:absolute (designed for
 * the grid/list thumbnail overlay). In compact cards the badge is placed
 * inline inside .te-ccard-body, which has no positioned ancestor, so the
 * badge was escaping the card and floating up into the view-switcher bar.
 * Override to position:static so it flows naturally in the flex row.
 */
.te-trek-card--compact .te-card-diff-badge {
  position: static;
}
.te-ccard-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}
.te-ccard-thumb {
  flex-shrink: 0;
  width: 68px; height: 68px;
  border-radius: var(--r-md,8px);
  overflow: hidden;
}
.te-ccard-thumb img { width: 100%; height: 100%; object-fit: cover; }
.te-ccard-body { flex: 1; min-width: 0; }
.te-ccard-title {
  font-size: 14px;
  font-weight: 700;
  margin: 2px 0 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.te-ccard-title a { color: var(--te-text); text-decoration: none; }
.te-ccard-title a:hover { color: var(--te-trek); }

/* Make compact/list cards span full width inside the legacy te-grid-3 (safety) */
.te-grid-3 .te-trek-card--list,
.te-grid-3 .te-trek-card--compact {
  grid-column: 1 / -1;
}
