/* ═══════════════════════════════════════════════════════════
   سلس HR — tutorials.css (Luxury Tutorials & Knowledge Base Hub)
   - Strict spacing rhythm, zero overlap, crystal-clear layout
   - Linear / Apple SaaS Documentation Architecture
   - Unified Control Deck (Portals + Categories + Format Filters)
   - Guaranteed full visibility (opacity: 1) on all cards & elements
   - Full dark/light mode compatibility with Salis HR tokens
   ═══════════════════════════════════════════════════════════ */

/* ── 0. Guarantee Visibility on all Reveal Elements in Tutorials ── */
.page-tutorials .reveal,
.page-tutorials .tutorial-card,
.page-tutorials .tutorials-hero-title,
.page-tutorials .tutorials-hero-subline,
.page-tutorials .tutorials-metrics-strip,
.page-tutorials .tutorials-search-wrapper,
.page-tutorials .tutorials-control-deck,
.page-tutorials .tutorials-cta-card {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

/* ── 1. Page Wrapper & Atmosphere ── */
.tutorials-page-wrapper {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  padding-bottom: 120px;
}

/* ── 2. Hero & Search Banner ── */
.tutorials-hero {
  padding: 125px 0 35px;
  position: relative;
  text-align: center;
}

.tutorials-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border-radius: 9999px;
  background: var(--primary-soft);
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

[data-theme="dark"] .tutorials-eyebrow {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.25);
  color: #38bdf8;
}

.tutorials-hero-title {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  font-weight: 900;
  line-height: 1.28;
  margin: 0 auto 16px;
  max-width: 960px;
  background: linear-gradient(135deg, var(--text) 30%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .tutorials-hero-title {
  background: linear-gradient(135deg, #ffffff 40%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tutorials-hero-subline {
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  line-height: 1.8;
  color: var(--muted);
  max-width: 780px;
  margin: 0 auto 28px;
}

/* Hero Metrics Strip */
.tutorials-metrics-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px 24px;
  margin: 0 auto 30px;
  padding: 12px 24px;
  border-radius: 9999px;
  max-width: fit-content;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-subtle);
}

[data-theme="dark"] .tutorials-metrics-strip {
  background: rgba(15, 23, 42, 0.75);
  border-color: rgba(56, 189, 248, 0.15);
}

.t-metric-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.t-metric-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.78rem;
}

[data-theme="dark"] .t-metric-icon {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
}

.t-metric-divider {
  width: 1px;
  height: 16px;
  background: var(--border);
}

/* ── 3. Search Bar Container ── */
.tutorials-search-wrapper {
  max-width: 740px;
  margin: 0 auto 10px;
  position: relative;
}

.tutorials-search-box {
  display: flex;
  align-items: center;
  position: relative;
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 8px 16px 8px 22px;
  box-shadow: 0 16px 36px -10px rgba(37, 99, 235, 0.12), 0 2px 6px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .tutorials-search-box {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(56, 189, 248, 0.28);
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.6), 0 0 24px rgba(0, 210, 255, 0.08) inset;
}

.tutorials-search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 20px 45px -8px rgba(37, 99, 235, 0.25), 0 0 0 4px var(--primary-soft);
  transform: translateY(-2px);
}

[data-theme="dark"] .tutorials-search-box:focus-within {
  border-color: #38bdf8;
  box-shadow: 0 20px 45px -8px rgba(0, 229, 255, 0.28), 0 0 0 4px rgba(56, 189, 248, 0.18);
}

.t-search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  width: 28px;
  height: 28px;
  margin-left: 10px;
  flex-shrink: 0;
}

[data-theme="dark"] .t-search-icon {
  color: #38bdf8;
}

.t-search-input {
  width: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  outline: none;
  padding: 8px 4px;
}

.t-search-input::placeholder {
  color: var(--text-dim);
  font-weight: 400;
}

.t-search-clear {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.t-search-clear:hover {
  color: var(--text);
  background: var(--surface-2);
}

.t-search-clear.visible {
  display: inline-flex;
}

/* Quick Search Suggestions */
.t-quick-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.t-quick-tag-label {
  font-weight: 600;
}

.t-tag-btn {
  background: rgba(255, 255, 255, 0.6);
  border: 1px dashed var(--border);
  color: var(--muted);
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

[data-theme="dark"] .t-tag-btn {
  background: rgba(15, 23, 42, 0.6);
}

.t-tag-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
  border-style: solid;
}

/* ── 4. Unified Control Deck (Portals + Categories + Format Filters) ── */
.tutorials-control-deck {
  background: rgba(255, 255, 255, 0.94);
  border: 1.5px solid var(--border);
  border-radius: 28px;
  padding: 24px 28px;
  margin: 30px auto 36px;
  max-width: 1240px;
  box-shadow: 0 16px 40px -12px rgba(37, 99, 235, 0.10), 0 2px 8px rgba(15, 23, 42, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  z-index: 5;
}

[data-theme="dark"] .tutorials-control-deck {
  background: rgba(15, 23, 42, 0.94);
  border-color: rgba(56, 189, 248, 0.22);
  box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 210, 255, 0.05) inset;
}

/* Row 1: Dual Segmented Role Switcher */
.role-segmented-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
  background: var(--surface-2);
  padding: 6px;
  border-radius: 18px;
  border: 1px solid var(--border-subtle);
  position: relative;
}

[data-theme="dark"] .role-segmented-switcher {
  background: rgba(7, 11, 20, 0.85);
  border-color: rgba(51, 65, 85, 0.6);
}

.role-tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 13px 20px;
  border-radius: 13px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.role-tab-btn:hover {
  color: var(--text);
}

.role-tab-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  box-shadow: 0 10px 24px -6px rgba(37, 99, 235, 0.45);
}

[data-theme="dark"] .role-tab-btn.active {
  background: linear-gradient(135deg, #0284c7, #0284c7 20%, #38bdf8);
  color: #070b14;
  font-weight: 800;
  box-shadow: 0 10px 24px -6px rgba(56, 189, 248, 0.45);
}

.role-tab-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.role-tab-count {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
}

.role-tab-btn.active .role-tab-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

[data-theme="dark"] .role-tab-btn.active .role-tab-count {
  background: rgba(0, 0, 0, 0.2);
  color: #070b14;
}

/* Row 2: Category Chips Row */
.deck-categories-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 4px;
  border-top: 1px solid var(--border-subtle);
}

.deck-section-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dim);
  flex-shrink: 0;
}

.category-chips-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  border-radius: 9999px;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.category-chip.active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

[data-theme="dark"] .category-chip.active {
  background: rgba(56, 189, 248, 0.16);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.2);
}

/* Row 3: Sub Toolbar (Format Pills + Active Badge & Results Count) */
.deck-bottom-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

/* Format Pills: All / Video / Written */
.format-toggle-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface-2);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
}

.format-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.format-btn:hover {
  color: var(--text);
}

.format-btn.active {
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

[data-theme="dark"] .format-btn.active {
  background: #38bdf8;
  color: #070b14;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

/* Active Status Pill & Counter */
.deck-status-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.status-role-badge.employee {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

[data-theme="dark"] .status-role-badge.employee {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.3);
}

.status-role-badge.admin {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.25);
}

[data-theme="dark"] .status-role-badge.admin {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}

.status-count-text {
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 500;
}

.status-count-num {
  font-weight: 800;
  color: var(--text);
  font-family: var(--font-num);
}

/* ── 5. Tutorials Grid & Card Architecture ── */
.tutorials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 26px;
  margin-top: 10px;
}

@media (max-width: 480px) {
  .tutorials-grid {
    grid-template-columns: 1fr;
  }
}

.tutorial-card {
  display: flex !important;
  flex-direction: column;
  background: var(--surface-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  cursor: pointer;
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

.tutorial-card:hover {
  transform: translateY(-6px) !important;
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 20px 48px -12px rgba(37, 99, 235, 0.18), 0 4px 12px rgba(15, 23, 42, 0.05);
}

[data-theme="dark"] .tutorial-card {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(51, 65, 85, 0.7);
}

[data-theme="dark"] .tutorial-card:hover {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.8), 0 0 32px rgba(0, 210, 255, 0.12) inset;
}

/* Card Media Preview Header */
.t-card-media {
  position: relative;
  height: 200px;
  width: 100%;
  background: #0f172a;
  overflow: hidden;
}

.t-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.92;
}

.tutorial-card:hover .t-card-img {
  transform: scale(1.05);
  opacity: 1;
}

/* Media Overlay Badges */
.t-media-badges {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
}

.t-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.t-badge.video {
  background: rgba(220, 38, 38, 0.9);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
}

.t-badge.written {
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.t-badge.dual {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(14, 165, 233, 0.95));
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

/* Play Button Trigger Overlay */
.t-play-trigger-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.32);
  transition: all 0.3s ease;
  z-index: 1;
}

.tutorial-card:hover .t-play-trigger-overlay {
  background: rgba(15, 23, 42, 0.15);
}

.t-play-btn-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 1.1rem;
}

[data-theme="dark"] .t-play-btn-circle {
  background: #ffffff;
  color: #070b14;
}

.tutorial-card:hover .t-play-btn-circle {
  transform: scale(1.14);
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.5);
}

[data-theme="dark"] .tutorial-card:hover .t-play-btn-circle {
  background: #38bdf8;
  color: #070b14;
  box-shadow: 0 12px 28px rgba(56, 189, 248, 0.5);
}

/* Time / Steps Bar at Bottom of Media */
.t-media-bottom-info {
  position: absolute;
  bottom: 10px;
  right: 12px;
  left: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}

.t-duration-chip,
.t-steps-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(7, 11, 20, 0.85);
  color: #f1f5f9;
  font-size: 0.74rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

/* Card Body */
.t-card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.t-card-category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.t-category-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

[data-theme="dark"] .t-category-label {
  color: #38bdf8;
}

.t-card-role-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 9999px;
  background: var(--surface-2);
  color: var(--muted);
}

[data-theme="dark"] .t-card-role-pill {
  background: rgba(30, 41, 59, 0.95);
  color: #94a3b8;
  border: 1px solid rgba(51, 65, 85, 0.7);
}

.t-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.48;
  color: var(--text);
  margin-bottom: 10px;
  transition: color 0.2s ease;
}

.tutorial-card:hover .t-card-title {
  color: var(--primary);
}

[data-theme="dark"] .tutorial-card:hover .t-card-title {
  color: #38bdf8;
}

.t-card-desc {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Key Highlights List */
.t-card-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
  margin-top: auto;
}

.t-hl-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

[data-theme="dark"] .t-hl-chip {
  background: rgba(30, 41, 59, 0.9);
  color: #cbd5e1;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

/* Card Action Footer */
.t-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

[data-theme="dark"] .t-card-footer {
  border-top-color: rgba(51, 65, 85, 0.7);
}

.t-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  transition: all 0.2s ease;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

[data-theme="dark"] .t-card-btn {
  color: #38bdf8;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.t-card-btn:hover {
  transform: translateX(-4px);
}

[dir="ltr"] .t-card-btn:hover {
  transform: translateX(4px);
}

.t-card-views {
  display: none !important;
}

/* ── 6. Empty State ── */
.tutorials-empty-state {
  text-align: center;
  padding: 60px 24px;
  max-width: 540px;
  margin: 0 auto;
  grid-column: 1 / -1;
  display: none;
}

.empty-state-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  color: var(--muted);
}

.empty-state-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.empty-state-desc {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 24px;
}

/* ── 7. Immersive Interactive Modal Reader & Video Suite ── */
.t-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.t-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.t-modal-container {
  width: 100%;
  max-width: 1220px;
  max-height: 92vh;
  background: #ffffff;
  border-radius: 28px;
  border: 1.5px solid var(--border);
  box-shadow: 0 32px 80px -16px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(24px) scale(0.97);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .t-modal-container {
  background: #0f172a;
  border-color: rgba(56, 189, 248, 0.25);
  box-shadow: 0 32px 80px -16px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 210, 255, 0.08) inset;
}

.t-modal-overlay.active .t-modal-container {
  transform: translateY(0) scale(1);
}

/* Modal Header */
.t-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-card);
  gap: 16px;
  flex-shrink: 0;
}

.t-modal-header-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.t-modal-pill-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.t-modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
}

.t-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.t-modal-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.05rem;
}

.t-modal-icon-btn:hover {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border);
}

.t-modal-close-btn {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
}

.t-modal-close-btn:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

/* Modal Content Area */
.t-modal-body {
  overflow-y: auto;
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Split-View Grid: Step-by-Step Written Guide (Right) + Video Suite / Real Mockup (Left) */
.t-modal-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 32px;
  align-items: start;
}

@media (max-width: 992px) {
  .t-modal-split-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.t-split-written-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.t-split-media-col {
  min-width: 0;
}

.t-sticky-media-card {
  position: sticky;
  top: 10px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.t-media-subcard {
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.t-media-subcard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.t-media-quality-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.25);
  font-family: var(--font-num);
}

[data-theme="dark"] .t-media-quality-badge {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}

.t-media-subcard-text {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--muted);
  margin: 0;
}

/* Cinematic Video Suite Player */
.t-video-suite {
  position: relative;
  background: #020617;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.5);
}

.t-video-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 480px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.t-video-poster-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #070b14;
}

/* Video Overlay Controls */
.t-video-controls-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
  padding: 16px 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 5;
}

.t-video-scrubber-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 9999px;
  position: relative;
  cursor: pointer;
}

.t-video-scrubber-progress {
  height: 100%;
  width: 35%;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  border-radius: 9999px;
  position: relative;
}

.t-video-scrubber-handle {
  position: absolute;
  top: 50%;
  right: -6px;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 8px rgba(0, 210, 255, 0.8);
}

.t-video-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
}

.t-video-left-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.t-player-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  padding: 4px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.t-player-btn:hover {
  transform: scale(1.15);
  color: #38bdf8;
}

.t-player-time {
  font-size: 0.82rem;
  font-family: var(--font-num);
  color: #94a3b8;
}

.t-video-right-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.t-speed-pill {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
}

/* Play state overlay */
.t-video-center-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  z-index: 4;
  transition: opacity 0.3s ease;
}

.t-video-center-play-overlay.playing {
  opacity: 0;
  pointer-events: none;
}

.t-big-play-btn {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.95);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 0 35px rgba(37, 99, 235, 0.6);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.t-big-play-btn:hover {
  transform: scale(1.12);
  background: #38bdf8;
  color: #070b14;
  box-shadow: 0 0 45px rgba(56, 189, 248, 0.8);
}

/* ── Step-by-Step Written Breakdown ── */
.t-written-guide {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.t-guide-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--border-subtle);
  padding-bottom: 12px;
}

.t-guide-section-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.t-steps-timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.t-step-item {
  display: flex;
  gap: 18px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 20px;
  transition: all 0.2s ease;
}

.t-step-item:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-subtle);
}

.t-step-num {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.t-step-content {
  flex: 1;
}

.t-step-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.t-step-desc {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--muted);
}

/* Pro Tip Callout */
.t-pro-tip-box {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 16px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--text);
  margin-top: 8px;
}

[data-theme="dark"] .t-pro-tip-box {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.28);
}

.t-pro-tip-icon {
  font-size: 1.4rem;
  line-height: 1;
  color: #10b981;
}

.t-pro-tip-text {
  font-size: 0.92rem;
  line-height: 1.7;
}

.t-pro-tip-text strong {
  color: #10b981;
  font-weight: 800;
}

[data-theme="dark"] .t-pro-tip-text strong {
  color: #34d399;
}

/* Feedback & Share Footer in Modal */
.t-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px 24px;
  background: var(--surface-2);
  border-radius: 16px;
  margin-top: 12px;
}

.t-feedback-question {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.t-feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.t-feedback-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.t-feedback-btn.rated {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* ── 8. Toast Notification ── */
.t-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #0f172a;
  color: #ffffff;
  padding: 10px 22px;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.t-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

[data-theme="dark"] .t-toast {
  background: #1e293b;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* ── 9. Dedicated Bottom Training / Support Section ── */
.tutorials-bottom-cta {
  padding: 60px 0 0;
}

.tutorials-cta-card {
  padding: 48px;
  border-radius: 32px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(239, 246, 255, 0.85));
  border: 1.5px solid rgba(0, 102, 255, 0.2);
  box-shadow: 0 24px 60px -15px rgba(0, 102, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  text-align: center;
  max-width: 980px;
  margin: 0 auto;
}

[data-theme="dark"] .tutorials-cta-card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(7, 11, 20, 0.95));
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 24px 64px -15px rgba(0, 0, 0, 0.7), 0 0 40px rgba(0, 210, 255, 0.1) inset;
}

.tutorials-cta-title {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--text);
}

.tutorials-cta-desc {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--muted);
  max-width: 680px;
  margin: 0 auto 32px;
}

.tutorials-cta-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

[data-theme="dark"] .tutorials-cta-actions .btn--primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  box-shadow: 0 8px 24px -4px rgba(2, 132, 199, 0.45) !important;
  font-weight: 800 !important;
}

[data-theme="dark"] .tutorials-cta-actions .btn--primary:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important;
  box-shadow: 0 12px 28px -4px rgba(14, 165, 233, 0.6) !important;
  border-color: rgba(56, 189, 248, 0.7) !important;
}

[data-theme="dark"] .tutorials-cta-actions .btn--secondary {
  background: rgba(15, 23, 42, 0.8) !important;
  color: #f1f5f9 !important;
  border: 1.5px solid rgba(148, 163, 184, 0.35) !important;
}

[data-theme="dark"] .tutorials-cta-actions .btn--secondary:hover {
  background: rgba(30, 41, 59, 0.95) !important;
  border-color: rgba(56, 189, 248, 0.6) !important;
  color: #38bdf8 !important;
}

/* ── 10. Responsive Breakpoints ── */
@media (max-width: 768px) {
  .tutorials-hero {
    padding: 100px 0 24px;
  }

  .tutorials-metrics-strip {
    border-radius: 20px;
    padding: 12px 18px;
    gap: 12px 20px;
  }

  .t-metric-divider {
    display: none;
  }

  .tutorials-control-deck {
    padding: 20px 16px;
    border-radius: 20px;
    margin: 20px auto 28px;
    gap: 16px;
  }

  .role-segmented-switcher {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .role-tab-btn {
    padding: 12px 16px;
    font-size: 0.98rem;
  }

  .deck-bottom-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .format-toggle-group {
    width: 100%;
    justify-content: space-around;
  }

  .deck-status-indicator {
    justify-content: space-between;
  }

  .t-modal-container {
    max-height: 96vh;
    border-radius: 20px;
  }

  .t-modal-header {
    padding: 16px 20px;
  }

  .t-modal-body {
    padding: 20px;
    gap: 24px;
  }

  .t-modal-title {
    font-size: 1.15rem;
  }

  .tutorials-cta-card {
    padding: 32px 20px;
    border-radius: 24px;
  }
}
