:root {
  --ops-workshop-accent: #2563eb;
  --ops-workshop-surface: var(--bs-body-bg, #fff);
  --ops-workshop-border: rgba(148, 163, 184, .32);
}

.ops-workshops-page { padding: clamp(12px, 2vw, 24px); }
.ops-workshops-header { margin-bottom: 1.25rem; }
.ops-workshops-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem;
}
.ops-workshops-filters { display: flex; gap: .75rem; flex: 1 1 680px; flex-wrap: wrap; }
.ops-workshops-filters .ops-search-group { flex: 2 1 280px; }
.ops-workshops-filters .form-select { flex: 1 1 180px; }
.ops-workshops-export { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ops-workshop-cover-thumb,
.ops-workshop-cover-placeholder {
  width: 64px;
  height: 52px;
  border-radius: .8rem;
  border: 1px solid var(--ops-workshop-border);
}
.ops-workshop-cover-thumb { display: block; object-fit: cover; background: #e2e8f0; }
.ops-workshop-cover-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(148, 163, 184, .12);
  color: var(--bs-secondary-color, #64748b);
  font-size: 1.25rem;
}
.ops-workshop-viewer {
  min-height: 280px;
  border: 1px solid var(--ops-workshop-border);
  border-radius: 1rem;
  background: rgba(148, 163, 184, .08);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ops-workshop-viewer video,
.ops-workshop-viewer iframe {
  display: block;
  width: 100%;
  min-height: min(72vh, 760px);
  border: 0;
  background: #0f172a;
}
.ops-workshop-description {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.75;
}
.ops-workshop-public-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(37, 99, 235, .14), transparent 34%),
    linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}
.ops-workshop-public-shell { max-width: 1320px; margin: 0 auto; padding: clamp(18px, 4vw, 48px); }
.ops-workshop-public-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.ops-workshop-public-logo { height: 42px; max-width: 180px; object-fit: contain; }
.ops-workshop-public-hero {
  background: linear-gradient(135deg, #0f172a, #1e3a8a 64%, #2563eb);
  color: #fff;
  border-radius: 1.75rem;
  padding: clamp(28px, 5vw, 64px);
  box-shadow: 0 30px 80px rgba(15, 23, 42, .18);
  margin-bottom: 1.5rem;
  overflow: hidden;
  position: relative;
}
.ops-workshop-public-hero::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  inset-inline-end: -80px;
  top: -100px;
}
.ops-workshop-public-hero h1 { font-weight: 800; max-width: 760px; font-size: clamp(2rem, 5vw, 4rem); }
.ops-workshop-public-hero p { max-width: 720px; color: rgba(255,255,255,.78); font-size: 1.08rem; }
.ops-workshop-public-filters {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(2, minmax(170px, 1fr));
  gap: .75rem;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 1.25rem;
  padding: 1rem;
  box-shadow: 0 18px 50px rgba(15,23,42,.08);
  margin-bottom: 1.5rem;
  position: sticky;
  top: .75rem;
  z-index: 10;
  backdrop-filter: blur(16px);
}
.ops-workshop-public-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.ops-workshop-public-card {
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 1.25rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15,23,42,.07);
  transition: transform .2s ease, box-shadow .2s ease;
  min-width: 0;
}
.ops-workshop-public-card:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(15,23,42,.12); }
.ops-workshop-public-cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #e2e8f0; }
.ops-workshop-public-cover-placeholder { aspect-ratio: 16/9; display: grid; place-items: center; background: linear-gradient(135deg,#dbeafe,#e0e7ff); color: #1d4ed8; font-size: 2.4rem; }
.ops-workshop-public-card-body { padding: 1.1rem; }
.ops-workshop-public-meta { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .75rem; }
.ops-workshop-public-meta span { background: #eff6ff; color: #1d4ed8; border-radius: 999px; padding: .3rem .6rem; font-size: .76rem; font-weight: 700; }
.ops-workshop-public-card h2 { font-size: 1.05rem; font-weight: 800; margin-bottom: .55rem; }
.ops-workshop-public-card p { color: #64748b; min-height: 3.2em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ops-workshop-public-footer { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: 1rem; }
.ops-workshop-public-counts { color: #64748b; font-size: .82rem; }

html[dir="rtl"] .ops-workshops-export,
html[dir="rtl"] .ops-workshops-filters { direction: rtl; }
html[data-ops-theme="dark"] .ops-workshop-viewer { background: rgba(15, 23, 42, .42); }

@media (max-width: 992px) {
  .ops-workshop-public-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-workshop-public-filters { grid-template-columns: 1fr 1fr; }
  .ops-workshop-public-filters .ops-public-search { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  .ops-workshops-toolbar, .ops-workshops-export { align-items: stretch; }
  .ops-workshops-export { width: 100%; }
  .ops-workshops-export .small { margin-inline-end: auto; align-self: center; }
  #opsWorkshopsTable thead { display: none; }
  #opsWorkshopsTable tbody { display: grid; gap: .75rem; padding: .75rem; }
  #opsWorkshopsTable tbody tr:not(.ops-workshops-empty-row) {
    display: grid;
    grid-template-columns: 72px 1fr;
    border: 1px solid var(--ops-workshop-border);
    border-radius: 1rem;
    padding: .8rem;
    background: var(--ops-workshop-surface);
  }
  #opsWorkshopsTable tbody td { display: block; border: 0; padding: .3rem .4rem; min-width: 0; }
  #opsWorkshopsTable tbody td:first-child { grid-row: span 3; }
  #opsWorkshopsTable tbody td:not(:first-child)::before {
    content: attr(data-label);
    display: block;
    color: var(--bs-secondary-color, #64748b);
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 700;
  }
  #opsWorkshopsTable .ops-actions-col { grid-column: 1 / -1; text-align: start !important; }
  #opsWorkshopsTable .ops-action-buttons { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .ops-workshop-public-grid { grid-template-columns: 1fr; }
  .ops-workshop-public-filters { grid-template-columns: 1fr; position: static; }
  .ops-workshop-public-filters .ops-public-search { grid-column: auto; }
  .ops-workshop-public-nav { align-items: flex-start; }
  .ops-workshop-viewer video, .ops-workshop-viewer iframe { min-height: 55vh; }
}
@media (prefers-reduced-motion: reduce) {
  .ops-workshop-public-card { transition: none; }
}

/* Public catalogue */
.ops-workshops-public-body {
  min-height: 100vh;
  background: var(--ops-bg, #f4f7fb);
  color: var(--ops-text, #172033);
}
.ops-workshops-public-nav {
  position: sticky;
  top: 0;
  z-index: 1020;
  padding: .8rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, .2);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px);
}
.ops-workshops-public-brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: inherit;
  font-weight: 800;
  text-decoration: none;
}
.ops-workshops-public-brand img { width: auto; height: 34px; max-width: 130px; object-fit: contain; }
.ops-workshops-public-hero {
  padding: clamp(2.5rem, 7vw, 5.5rem) 0;
  color: #fff;
  background:
    radial-gradient(circle at 80% 15%, rgba(56, 189, 248, .35), transparent 34%),
    radial-gradient(circle at 20% 80%, rgba(129, 140, 248, .28), transparent 38%),
    linear-gradient(135deg, #0b1220, #172554 58%, #1d4ed8);
}
.ops-workshops-public-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2rem; }
.ops-workshops-public-hero h1 { max-width: 780px; margin: .7rem 0 1rem; font-size: clamp(2rem, 5vw, 4rem); font-weight: 850; letter-spacing: -.045em; }
.ops-workshops-public-hero p { max-width: 720px; margin: 0; color: rgba(255,255,255,.78); font-size: clamp(1rem, 2vw, 1.2rem); }
.ops-workshops-public-hero .ops-page-eyebrow { color: #bae6fd; }
.ops-workshops-public-summary { min-width: 160px; padding: 1.4rem; border: 1px solid rgba(255,255,255,.2); border-radius: 1.4rem; background: rgba(255,255,255,.1); text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,.2); }
.ops-workshops-public-summary strong { display: block; font-size: 2.6rem; line-height: 1; }
.ops-workshops-public-summary span { display: block; margin-top: .45rem; color: rgba(255,255,255,.76); }
.ops-workshops-public-filters { position: sticky; top: 76px; z-index: 1000; box-shadow: 0 14px 38px rgba(15, 23, 42, .08); }
.ops-workshops-public-count { display: grid; place-items: center; min-height: 38px; min-width: 44px; border-radius: .8rem; background: #e0e7ff; color: #3730a3; font-weight: 800; }
.ops-workshops-public-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.ops-workshop-public-card { overflow: hidden; border: 0; border-radius: 1.2rem; box-shadow: 0 10px 30px rgba(15, 23, 42, .08); transition: transform .2s ease, box-shadow .2s ease; }
.ops-workshop-public-card:hover { transform: translateY(-4px); box-shadow: 0 22px 45px rgba(15, 23, 42, .14); }
.ops-workshop-public-cover { position: relative; display: grid; place-items: center; height: 205px; overflow: hidden; background: linear-gradient(145deg, #dbeafe, #e0e7ff); }
.ops-workshop-public-cover img { width: 100%; height: 100%; object-fit: cover; }
.ops-workshop-public-cover > span:not(.ops-workshop-public-type) { font-size: 3rem; color: #4f46e5; }
.ops-workshop-public-type { position: absolute; top: .85rem; inset-inline-end: .85rem; box-shadow: 0 6px 16px rgba(15,23,42,.12); }
.ops-workshop-public-description { display: -webkit-box; min-height: 4.5em; overflow: hidden; color: #64748b; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.ops-workshop-public-meta { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; color: #64748b; font-size: .82rem; }
.ops-workshop-public-meta span { display: inline-flex; align-items: center; gap: .3rem; }
.ops-workshops-public-footer { padding: 1.5rem 0; border-top: 1px solid rgba(148, 163, 184, .2); color: #64748b; text-align: center; }
.ops-workshops-public-body .ops-workshop-viewer iframe,
.ops-workshops-public-body .ops-workshop-viewer video { width: 100%; min-height: 62vh; border: 0; border-radius: 1rem; background: #0b1220; }

@media (max-width: 991.98px) {
  .ops-workshops-public-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-workshops-public-hero-grid { grid-template-columns: 1fr; }
  .ops-workshops-public-summary { justify-self: start; }
  .ops-workshops-public-filters { position: static; }
}
@media (max-width: 575.98px) {
  .ops-workshops-public-nav .container-xl { align-items: flex-start !important; }
  .ops-workshops-public-brand span { display: none; }
  .ops-workshops-public-brand img { height: 30px; max-width: 95px; }
  .ops-workshops-public-grid { grid-template-columns: 1fr; }
  .ops-workshop-public-cover { height: 190px; }
  .ops-workshops-public-hero { padding: 2.4rem 0; }
}
@media (prefers-color-scheme: dark) {
  .ops-workshops-public-body { background: #0b1220; color: #e5edf7; }
  .ops-workshops-public-nav { background: rgba(11,18,32,.94); border-color: rgba(148,163,184,.18); }
  .ops-workshops-public-brand img { filter: invert(1) grayscale(1) brightness(2); }
  .ops-workshop-public-card, .ops-workshops-public-filters { background: #111c31; color: #e5edf7; }
  .ops-workshop-public-description, .ops-workshop-public-meta { color: #94a3b8; }
}
