/* /new/tutorials/ — סרטוני הדרכה (public video gallery)
   נבנה על טוקני-המותג (tokens.css). אקצנט-וידאו ייעודי: טורקיז→כחול,
   נשען על מבנה-הכרטיס של gallery.css לשמירת עקביות בשל (shell). */

:root {
  --tut-teal: #36e0c8;
  --tut-blue: #1aa3e8;
  --tut-video-grad: linear-gradient(135deg, var(--tut-teal), var(--tut-blue));
}

/* ── Hero ── */
.tut-hero { text-align: center; padding: var(--s-7); }
.tut-hero .pp-card__title { justify-content: center; }
.tut-hero .pp-card__sub {
  text-align: center; max-width: 560px; margin: var(--s-2) auto 0;
  font-size: var(--t-h4); color: var(--ink-2);
}

/* ── Category chips (filter) ── */
.tut-filters {
  display: flex; flex-wrap: wrap; gap: var(--s-2);
  margin-bottom: var(--s-5); justify-content: center;
}
.tut-chip {
  font: inherit; font-size: var(--t-small); font-weight: 600;
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--stroke-strong);
  background: var(--surface-0); color: var(--ink-2);
  cursor: pointer; transition: all var(--t-base); white-space: nowrap;
}
.tut-chip:hover { border-color: var(--tut-blue); color: var(--ink-1); }
.tut-chip.is-active {
  background: var(--tut-video-grad); color: #fff; border-color: transparent;
  box-shadow: 0 2px 10px rgba(26, 163, 232, 0.30);
}

/* ── Grid ── */
.tut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--s-4);
}

/* ── Card ── */
.tut-card {
  background: var(--surface-0);
  border: 1px solid var(--stroke);
  border-radius: var(--r-4);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
  text-align: start;
}
.tut-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-3);
  border-color: var(--tut-blue);
}
.tut-card.is-coming { cursor: default; }
.tut-card.is-coming:hover { transform: none; box-shadow: var(--sh-1); border-color: var(--stroke); }

/* poster — יחס 16:9 קבוע (בלי CLS) */
.tut-card__thumb {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
  position: relative; overflow: hidden;
}
.tut-card__thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.tut-card__thumb-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-4); font-size: 3rem;
}

/* כפתור-play מרחף */
.tut-card__play {
  position: absolute; inset: 0; margin: auto;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--tut-video-grad);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(10, 11, 13, 0.35);
  transition: transform var(--t-base);
  pointer-events: none;
}
.tut-card:hover .tut-card__play { transform: scale(1.10); }
.tut-card__play svg { margin-inline-start: 3px; } /* איזון אופטי של המשולש */

/* תג-משך (פינה תחתונה) */
.tut-card__dur {
  position: absolute; bottom: 8px; inset-inline-end: 8px;
  background: rgba(10, 11, 13, 0.78); color: #fff;
  font-size: 12px; font-weight: 600;
  padding: 2px 7px; border-radius: 6px;
}
/* תג "בקרוב" */
.tut-card__soon {
  position: absolute; top: 8px; inset-inline-start: 8px;
  background: rgba(10, 11, 13, 0.72); color: #fff;
  font-size: 12px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px;
}
/* וי "נצפה" (פינה עליונה, צד-הפוך מ"בקרוב") */
.tut-card__watched {
  position: absolute; top: 8px; inset-inline-end: 8px;
  width: 24px; height: 24px; border-radius: 50%;
  background: #22c55e;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(10, 11, 13, 0.35);
}
.tut-card.is-watched .tut-card__title { color: var(--ink-2); }

.tut-card__body { padding: var(--s-3) var(--s-4) var(--s-4); flex: 1; display: flex; flex-direction: column; }
.tut-card__cat {
  align-self: flex-start;
  font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--tut-blue);
  margin-bottom: var(--s-1);
}
.tut-card__title {
  font-size: var(--t-h4); font-weight: 600; color: var(--ink-1);
  margin: 0 0 var(--s-1); line-height: 1.35;
}
.tut-card__desc {
  font-size: var(--t-small); color: var(--ink-3); line-height: 1.5;
  margin: 0;
}

/* ── כיבוד hidden (אותו footgun כמו בגלריה: display:grid דורס [hidden]) ── */
.tut-grid[hidden],
.tut-modal[hidden] { display: none !important; }

/* ── Modal player ── */
.tut-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: var(--s-4);
}
.tut-modal__overlay {
  position: absolute; inset: 0;
  background: rgba(6, 8, 12, 0.82);
  backdrop-filter: blur(4px);
}
.tut-modal__content {
  position: relative;
  width: min(960px, 100%);
  background: #0b0d10;
  border-radius: var(--r-5);
  overflow: hidden;
  box-shadow: var(--sh-4);
}
.tut-modal__close {
  position: absolute; top: 10px; inset-inline-start: 10px; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.45); color: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.tut-modal__close:hover { background: rgba(0, 0, 0, 0.7); }
/* מסגרת-נגן ביחס 16:9 */
.tut-modal__frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background: #000;
}
.tut-modal__frame iframe,
.tut-modal__frame video {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
  display: block;
}
.tut-modal__caption {
  padding: var(--s-3) var(--s-4);
  color: #e8eaee; font-size: var(--t-body);
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3);
}
.tut-modal__caption-text { min-width: 0; }
.tut-modal__caption h2 { margin: 0 0 4px; font-size: var(--t-h4); color: #fff; }
.tut-modal__caption p { margin: 0; color: #a9adb6; font-size: var(--t-small); }

/* כפתור שיתוף במודאל */
.tut-modal__share {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: var(--t-small); font-weight: 600;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  background: rgba(255, 255, 255, 0.08); color: #fff;
  cursor: pointer; transition: background var(--t-base), border-color var(--t-base);
}
.tut-modal__share:hover { background: var(--tut-video-grad); border-color: transparent; }
.tut-modal__share svg { display: block; }
@media (max-width: 640px) {
  .tut-modal__share span { display: none; }   /* בנייד — אייקון בלבד */
  .tut-modal__share { padding: 8px; }
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .tut-hero { padding: var(--s-5); }
  .tut-grid { grid-template-columns: 1fr; }
  .tut-modal { padding: 0; align-items: stretch; }
  .tut-modal__content { border-radius: 0; width: 100%; margin: auto 0; }
}

/* ── Dark theme (עקבי עם public-shell) ── */
@media (prefers-color-scheme: dark) {
  .tut-chip { background: var(--surface-0); }
}
