/* ============================================================
   workshops-public.css — /workshops (public workshop marketplace)

   Converted from the approved workshops.html mockup. Header, footer, dock,
   toast, buttons and design tokens come from public-shell.css; this file
   only holds what is specific to the workshops page. The card language
   (.workshop-app-card, .w-*) is the same one the homepage carousel uses.
   ============================================================ */

/* ================= HERO ================= */
.workshop-hero-card {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  background: #0b1329; color: #fff; box-shadow: var(--shadow-card);
  min-height: 250px; margin: 14px 0 20px; isolation: isolate;
  display: flex; flex-direction: column; justify-content: center;
  padding: 14px 18px; text-align: center;
}
@media (min-width: 768px) { .workshop-hero-card { min-height: 270px; margin: 16px 0 22px; padding: 20px 32px; } }
@media (min-width: 1024px) { .workshop-hero-card { min-height: 290px; padding: 24px 40px; } }
.workshop-hero-card::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(circle at 18% 20%, rgba(37,99,235,0.35), transparent 45%),
              radial-gradient(circle at 82% 85%, rgba(124,58,237,0.28), transparent 45%);
  pointer-events: none;
}

.hero-live-badges { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 8px; }
.live-badge-pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.68rem; font-weight: 700;
  color: #e2e8f0; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  padding: 4px 10px; border-radius: var(--radius-full); max-width: 100%;
}
.live-badge-pill .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-badge-pill .dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.live-badge-pill .dot.green { background: var(--accent-green); box-shadow: 0 0 0 3px rgba(16,185,129,0.25); animation: pulseDot 1.8s ease-in-out infinite; }
.live-badge-pill .dot.red { background: var(--accent-red); box-shadow: 0 0 0 3px rgba(239,68,68,0.25); animation: pulseDot 1.8s ease-in-out infinite; }
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .live-badge-pill .dot { animation: none !important; } }
@media (max-width: 640px) { .hero-live-badges { justify-content: center; } .live-badge-pill:nth-child(2) { display: none; } }

.workshop-hero-card h1 {
  position: relative; z-index: 1; font-size: clamp(1.1rem, 3vw, 1.9rem); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.2; margin-bottom: 6px;
}
.workshop-hero-card h1 span.hl { color: #7dd3fc; }
.workshop-hero-card p.sub {
  position: relative; z-index: 1; max-width: 620px; margin: 0 auto 10px; color: #cbd5e1;
  font-size: 0.78rem; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
@media (min-width: 768px) { .workshop-hero-card p.sub { font-size: 0.86rem; margin-bottom: 16px; } }

.hero-search-box {
  position: relative; z-index: 1; display: flex; align-items: center; background: #ffffff;
  border-radius: var(--radius-full); padding: 4px 6px 4px 14px; margin: 2px auto 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25); width: 100%; max-width: 460px;
}
.hero-search-box i { color: var(--text-subtle); margin-right: 8px; font-size: 1rem; }
.hero-search-box input {
  flex: 1; border: none; outline: none; font-size: 16px; font-family: inherit; color: var(--text-main); min-width: 0; background: transparent;
}
.hero-search-box button {
  background: var(--primary); color: #fff; font-weight: 700; font-size: 0.78rem;
  padding: 8px 16px; border-radius: var(--radius-full); transition: var(--transition); flex-shrink: 0; border: 0; cursor: pointer; font-family: inherit;
}
.hero-search-box button:hover { background: var(--primary-hover); }

/* ================= SECTION HEADER ================= */
.app-section-header { display: flex; align-items: flex-end; justify-content: space-between; margin: 22px 0 4px; gap: 12px; flex-wrap: wrap; }
.app-section-header h2 { font-size: 1.25rem; font-weight: 800; color: #0f172a; letter-spacing: -0.02em; }
.app-section-header p.section-sub { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }


.no-js-submit { border: 1.5px solid var(--border); background: #fff; border-radius: var(--radius-md); padding: 8px 12px; font-size: 0.82rem; font-weight: 700; font-family: inherit; cursor: pointer; }
.has-js .no-js-submit { display: none; }

/* ================= PAGINATION ================= */
.pagination-row { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 26px 0 10px; flex-wrap: wrap; }
.page-num-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: #fff; font-weight: 700; font-size: 0.86rem; color: var(--text-muted); transition: var(--transition); }
.page-num-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
a.page-num-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-num-btn.disabled { opacity: 0.4; cursor: not-allowed; }
.page-arrow-btn { padding: 0 14px; gap: 4px; }

/* ================= WORKSHOP CARDS (same card language as the homepage carousel) ================= */
/* Columns are set explicitly (not auto-fill) so the page is 4 across on desktop:
   4 x ~278px + gaps fits the 1200px container exactly, so the breakpoint sits
   at 1200px. minmax(0, 1fr) lets a long title wrap instead of stretching a column. */
.workshops-page-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 8px; scroll-margin-top: 80px; }
@media (min-width: 1200px) { .workshops-page-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 899px) { .workshops-page-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.workshop-app-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-subtle); transition: var(--transition); display: flex; flex-direction: column; min-width: 0; }
.workshop-app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
@media (prefers-reduced-motion: reduce) { .workshop-app-card:hover { transform: none; } }

.w-card-thumb-wrap { display: block; position: relative; height: 140px; background: #0f172a; overflow: hidden; }
.w-card-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; }
.w-card-thumb-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1e3a8a, #7c3aed); color: rgba(255,255,255,0.75); font-size: 2.2rem; }
.w-date-badge { position: absolute; top: 10px; left: 10px; background: #fff; color: var(--text-main); padding: 4px 8px; border-radius: 8px; font-size: 0.68rem; font-weight: 800; text-align: center; line-height: 1.1; box-shadow: 0 4px 10px rgba(0,0,0,0.12); }
.w-date-badge span.day { font-size: 0.88rem; display: block; color: var(--primary); }
.w-tag-chip { position: absolute; top: 10px; right: 10px; background: rgba(15,23,42,0.75); color: #fff; font-size: 0.68rem; font-weight: 800; padding: 3px 7px; border-radius: 4px; }
.w-topic-chip { position: absolute; bottom: 10px; left: 10px; max-width: calc(100% - 20px); background: rgba(255,255,255,0.92); color: #1d4ed8; font-size: 0.66rem; font-weight: 800; padding: 3px 8px; border-radius: var(--radius-full); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.w-card-body { padding: 14px; display: flex; flex-direction: column; flex: 1; }
.w-urgency { font-size: 0.7rem; font-weight: 700; color: #dc2626; display: flex; align-items: center; gap: 4px; margin-bottom: 4px; }
.w-card-title a { color: inherit; }
.w-card-title a:hover { color: var(--primary); }
.w-card-title { font-size: 0.95rem; font-weight: 700; color: #0f172a; margin-bottom: 4px; line-height: 1.35; }
.w-card-author { font-size: 0.76rem; color: var(--text-muted); margin-bottom: 4px; line-height: 1.4; }
.w-card-author a { font-weight: 700; color: var(--text-main); }
.w-card-author a:hover { color: var(--primary); }
.w-card-blurb { font-size: 0.76rem; color: var(--text-muted); line-height: 1.45; margin-bottom: 8px; }
.w-card-meta-chips { display: flex; align-items: center; gap: 10px; font-size: 0.72rem; color: var(--text-muted); margin-bottom: 12px; flex-wrap: wrap; }
.w-card-meta-chips span { display: inline-flex; align-items: center; gap: 3px; }
.w-card-meta-chips i { color: var(--text-subtle); }
.w-card-meta-chips i.star { color: var(--accent-amber-text, #b45309); }
.w-card-footer .btn { min-height: 40px; }
@media (max-width: 899px) { .w-card-footer .btn { min-height: 44px; } }
.w-card-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border-light); margin-top: auto; }
.w-price { font-size: 1.05rem; font-weight: 800; color: #0f172a; }
.w-price small { font-size: 0.74rem; color: var(--text-muted); text-decoration: line-through; margin-left: 4px; font-weight: 600; }

.empty-state-block { text-align: center; padding: 60px 20px; grid-column: 1 / -1; }
.empty-state-block i { font-size: 2.4rem; color: var(--text-subtle); margin-bottom: 12px; display: block; }
.empty-state-block h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: 6px; }
.empty-state-block p { color: var(--text-muted); font-size: 0.86rem; margin-bottom: 14px; }

@media (max-width: 640px) { .workshops-page-grid { grid-template-columns: minmax(0, 1fr); } }


/* ============================================================
   POLISH — alignment, rhythm, motion
   ============================================================ */
@keyframes wsRise   { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes wsFade   { from { opacity: 0; } to { opacity: 1; } }
@keyframes wsPop    { from { opacity: 0; transform: scale(.88); } to { opacity: 1; transform: none; } }
@keyframes wsFloat  { 0%,100% { transform: translate3d(0,0,0); } 50% { transform: translate3d(24px,-18px,0); } }
@keyframes wsFloat2 { 0%,100% { transform: translate3d(0,0,0); } 50% { transform: translate3d(-28px,16px,0); } }

/* ---------- Hero: compact, centred, no dead space now the stats box is gone ---------- */
.workshop-hero-card { min-height: 0; padding: 22px 18px 26px; align-items: center; gap: 0; animation: wsFade .5s ease both; }
@media (min-width: 768px)  { .workshop-hero-card { padding: 30px 32px 34px; } }
@media (min-width: 1024px) { .workshop-hero-card { padding: 36px 40px 40px; } }
.workshop-hero-card::before { animation: wsFloat 14s ease-in-out infinite; inset: -20%; }
.workshop-hero-card::after {
  content: ''; position: absolute; width: 340px; height: 340px; right: -90px; bottom: -150px; z-index: 0;
  border-radius: 50%; background: radial-gradient(circle, rgba(14,165,233,.28), transparent 65%);
  animation: wsFloat2 16s ease-in-out infinite; pointer-events: none;
}
.hero-live-badges { justify-content: center; flex-wrap: wrap; margin-bottom: 14px; animation: wsRise .55s .05s cubic-bezier(.2,.7,.2,1) both; }
.live-badge-pill { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); padding: 5px 12px; }
.workshop-hero-card h1 { font-size: clamp(1.35rem, 3.6vw, 2.25rem); margin-bottom: 8px; animation: wsRise .6s .12s cubic-bezier(.2,.7,.2,1) both; }
.workshop-hero-card p.sub { margin: 0 auto 18px; animation: wsRise .6s .18s cubic-bezier(.2,.7,.2,1) both; }
@media (min-width: 768px) { .workshop-hero-card p.sub { font-size: .92rem; margin-bottom: 22px; } }
.hero-search-box { margin: 0 auto; max-width: 520px; padding: 5px 6px 5px 16px; animation: wsRise .6s .24s cubic-bezier(.2,.7,.2,1) both; transition: box-shadow .25s ease, transform .25s ease; }
.hero-search-box:focus-within { box-shadow: 0 0 0 4px rgba(125,211,252,.35), 0 8px 24px rgba(0,0,0,.3); transform: translateY(-1px); }
.hero-search-box button { padding: 10px 20px; font-size: .82rem; }
.hero-search-box button:active { transform: scale(.96); }

/* ---------- Section header ---------- */
.app-section-header { margin: 26px 0 14px; align-items: center; }
.app-section-header h2 { font-size: 1.3rem; }

/* ---------- Filter toolbar: one card, 4 equal fields ---------- */
.filter-toolbar {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 14px 16px; margin: 0 0 14px; box-shadow: var(--shadow-subtle);
}
.filter-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; }
.filter-label { display: inline-flex; align-items: center; gap: 5px; font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.filter-label i { color: var(--primary); font-size: .9rem; }
.filter-field select {
  appearance: none; -webkit-appearance: none; width: 100%; min-width: 0; height: 44px;
  padding: 0 38px 0 14px; font: 700 16px/1 inherit; font-family: inherit; color: var(--text-main);
  background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1.5px solid var(--border); border-radius: var(--radius-md); cursor: pointer;
  text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
@media (min-width: 641px) { .filter-field select { font-size: .86rem; } }
.filter-field select:hover { border-color: #93c5fd; background-color: #fff; }
.filter-field select:focus-visible { outline: none; border-color: var(--primary); background-color: #fff; box-shadow: 0 0 0 4px rgba(37,99,235,.14); }
.filter-field select:not([data-sort]):has(option:checked:not([value=""])) { border-color: var(--primary); background-color: var(--primary-light); color: var(--primary); }
.filter-toolbar .no-js-submit { grid-column: 1 / -1; justify-self: start; }
@media (max-width: 899px) { .filter-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 12px; } }
@media (max-width: 380px) { .filter-toolbar { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Results header + chips ---------- */
.results-head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin: 0 0 16px; min-height: 32px; }
.results-count-txt { font-size: .88rem; font-weight: 600; color: var(--text-muted); }
.results-count-txt strong { color: #0f172a; font-weight: 800; }
.active-filters-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; min-width: 0; }
.active-filters-row.filled { margin: 0; }
.filter-chip-el { display: inline-flex; align-items: center; gap: 8px; background: var(--primary-light); color: var(--primary); border: 1px solid #bfdbfe; font-size: .76rem; font-weight: 700; padding: 5px 6px 5px 12px; border-radius: var(--radius-full); animation: wsPop .25s cubic-bezier(.2,.7,.2,1) both; max-width: 100%; }
.filter-chip-el a { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; font-size: .7rem; line-height: 1; color: inherit; transition: background .15s ease, color .15s ease; }
.filter-chip-el a:hover { background: var(--primary); color: #fff; }
.filter-reset-link { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 700; color: var(--text-muted); padding: 5px 10px; border-radius: var(--radius-full); transition: color .15s ease, background .15s ease; }
.filter-reset-link:hover { color: var(--primary); background: var(--primary-light); }
@media (max-width: 640px) { .results-head-row { flex-direction: column; align-items: flex-start; } }

/* ---------- Cards: equal heights, clamped text, staggered entrance, hover polish ---------- */
.workshops-page-grid { gap: 20px; align-items: stretch; }
.workshop-app-card {
  border-radius: var(--radius-lg); animation: wsRise .5s cubic-bezier(.2,.7,.2,1) both;
  transition: transform .28s cubic-bezier(.2,.7,.2,1), box-shadow .28s ease, border-color .28s ease;
}
.workshop-app-card:nth-child(1) { animation-delay: .00s; } .workshop-app-card:nth-child(2) { animation-delay: .05s; }
.workshop-app-card:nth-child(3) { animation-delay: .10s; } .workshop-app-card:nth-child(4) { animation-delay: .15s; }
.workshop-app-card:nth-child(5) { animation-delay: .20s; } .workshop-app-card:nth-child(6) { animation-delay: .25s; }
.workshop-app-card:nth-child(7) { animation-delay: .30s; } .workshop-app-card:nth-child(8) { animation-delay: .35s; }
.workshop-app-card:hover { transform: translateY(-6px); border-color: #bfdbfe; }
.workshop-app-card:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.14); }

.w-card-thumb-wrap { height: 156px; }
.w-card-thumb-wrap::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,23,42,.18) 0%, transparent 35%, rgba(15,23,42,.45) 100%); pointer-events: none; }
.w-card-thumb-wrap img, .w-card-thumb-fallback { transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.workshop-app-card:hover .w-card-thumb-wrap img, .workshop-app-card:hover .w-card-thumb-fallback { transform: scale(1.07); }
.w-date-badge, .w-tag-chip, .w-topic-chip { z-index: 2; }
.w-date-badge { min-width: 42px; padding: 5px 9px; border-radius: 10px; }
.w-tag-chip { border-radius: 6px; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }

.w-card-body { padding: 16px; gap: 0; }
.w-urgency { margin-bottom: 6px; }
.w-card-title { font-size: .98rem; line-height: 1.35; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.w-card-author { margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-card-blurb { margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.w-card-meta-chips { gap: 6px 12px; margin-bottom: 14px; }
.w-card-footer { padding-top: 14px; flex-wrap: nowrap; }
.w-price { white-space: nowrap; }
.w-price small { display: inline-block; }
.w-card-footer .btn { flex-shrink: 0; white-space: nowrap; transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease; }
.w-card-footer .btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(37,99,235,.28); }
.w-card-footer .btn:active { transform: scale(.97); }
@media (max-width: 380px) { .w-card-footer { flex-wrap: wrap; } .w-card-footer .btn { width: 100%; } }

/* ---------- Empty state ---------- */
.empty-state-block { background: #fff; border: 1.5px dashed var(--border); border-radius: var(--radius-lg); padding: 56px 20px; animation: wsRise .45s ease both; }
.empty-state-block i { width: 72px; height: 72px; line-height: 72px; border-radius: 50%; background: var(--primary-light); color: var(--primary); margin: 0 auto 16px; font-size: 2rem; }

/* ---------- Pagination ---------- */
.pagination-row { gap: 6px; padding: 30px 0 14px; }
.page-num-btn { min-width: 40px; height: 40px; border-radius: 10px; transition: transform .18s ease, border-color .18s ease, color .18s ease, background .18s ease, box-shadow .18s ease; }
a.page-num-btn:hover { transform: translateY(-2px); background: var(--primary-light); }
a.page-num-btn:active { transform: scale(.95); }
.page-num-btn.active { box-shadow: 0 6px 14px rgba(37,99,235,.28); }
.page-num-btn.disabled { opacity: .4; }

/* ---------- Keyboard focus, everywhere on the page ---------- */
.workshop-app-card a:focus-visible, .pagination-row a:focus-visible, .filter-chip-el a:focus-visible, .filter-reset-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

/* ---------- Reduced motion: keep layout, drop movement ---------- */
@media (prefers-reduced-motion: reduce) {
  .workshop-hero-card, .workshop-hero-card::before, .workshop-hero-card::after, .hero-live-badges, .workshop-hero-card h1,
  .workshop-hero-card p.sub, .hero-search-box, .workshop-app-card, .filter-chip-el, .empty-state-block { animation: none !important; }
  .workshop-app-card:hover, .workshop-app-card:hover .w-card-thumb-wrap img, .w-card-footer .btn:hover, a.page-num-btn:hover { transform: none !important; }
}
