/* ============================================================
   Fisio.Art Academy — Central de Tutoriais / Treinamentos
   Segue a paleta do site (verde-escuro --fa-dark + teal), igual ao blog.
   Prefixo .tut-  | Tema: trilha de aprendizado + player de curso
   ============================================================ */

.tut {
  --tut-ink: #0a2a2d;
  --tut-ink-2: #0f3a3e;
  --tut-muted: #5b6b6a;
  --tut-line: #e4eeec;
  --tut-surface: #ffffff;
  --tut-soft: #f1f7f6;
  --tut-accent: #14b8a6;
  --tut-accent-2: #0d9488;
  --tut-accent-3: #14b8a6;
  --tut-grad: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}

/* ===== NAV DARK — index de tutoriais tem hero escuro (segue o padrão do blog) ===== */
body:has(.tut-hero) .site-nav {
  background: var(--fa-dark);
  border-bottom: 1px solid rgba(255,255,255,.06);
  backdrop-filter: none;
}
body:has(.tut-hero) .site-nav .brand-logo,
body:has(.tut-hero) .site-nav .brand-logo span:not(.mark) { color: #fff; }
body:has(.tut-hero) .site-nav .brand-logo .mark { background: var(--fa-grad-teal); }
body:has(.tut-hero) .site-nav .brand-logo-img--for-light-bg { display: none; }
body:has(.tut-hero) .site-nav .brand-logo-img--for-dark-bg { display: inline-block; }
body:has(.tut-hero) .site-nav .menu a { color: rgba(255,255,255,.85); font-weight: 500; }
body:has(.tut-hero) .site-nav .menu a:hover { background: rgba(255,255,255,.08); color: #fff; }
body:has(.tut-hero) .site-nav .btn-ghost { background: transparent; border-color: transparent; color: #fff; }
body:has(.tut-hero) .site-nav .btn-ghost:hover { background: rgba(255,255,255,.08); }
body:has(.tut-hero) .site-nav .btn-primary { background: var(--fa-grad-teal); box-shadow: 0 6px 18px rgba(20,184,166,.35); }

@media (max-width: 900px) {
  body:has(.tut-hero) .site-nav__panel { background: #0d3234; border-color: rgba(255,255,255,.08); }
  body:has(.tut-hero) .site-nav__panel-menu a { color: rgba(255,255,255,.8); border-color: rgba(255,255,255,.07); }
  body:has(.tut-hero) .site-nav__panel-menu a:hover { color: var(--fa-teal-light); }
  body:has(.tut-hero) .site-nav__panel-actions { border-color: rgba(255,255,255,.08); }
  body:has(.tut-hero) .site-nav__burger { border-color: rgba(255,255,255,.2); }
  body:has(.tut-hero) .site-nav__burger span { background: #fff; }
}

/* ---------- Breadcrumb próprio ---------- */
.tut-crumb {
  display: flex;
  gap: 8px;
  font-size: 13px;
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  flex-wrap: wrap;
}
.tut-crumb li { display: flex; gap: 8px; align-items: center; }
.tut-crumb li:not(:last-child)::after { content: "/"; opacity: .4; }
.tut-crumb a { color: inherit; opacity: .85; text-decoration: none; }
.tut-crumb a:hover { opacity: 1; text-decoration: underline; }

/* ============================================================
   HERO (apenas público) — banner de "academy"
   ============================================================ */
.tut-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(20, 184, 166, .28), transparent 60%),
    radial-gradient(700px 380px at 0% 110%, rgba(20, 184, 166, .14), transparent 55%),
    var(--fa-dark, #0a2a2d);
  color: #fff;
  padding: 64px 0 96px;
}
.tut-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(600px 360px at 70% 0%, #000, transparent 75%);
  opacity: .5;
}
.tut-hero::after {
  content: "";
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 50px;
  background: #fff;
  clip-path: ellipse(80% 100% at 50% 100%);
  z-index: 1;
}
.tut-hero .tut-crumb { color: rgba(255,255,255,.75); position: relative; z-index: 2; }
.tut-hero__inner { position: relative; z-index: 2; max-width: 720px; }
.tut-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  color: #bff3ea;
}
.tut-hero__title {
  font-size: clamp(30px, 4.4vw, 50px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 18px 0 14px;
  color: #fff;
}
.tut-hero__title em {
  font-style: normal;
  background: linear-gradient(120deg, #5eead4, #14b8a6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tut-hero__lead {
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255,255,255,.82);
  max-width: 600px;
}
.tut-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin-top: 30px;
}
.tut-hero__stat { display: flex; flex-direction: column; }
.tut-hero__stat b { font-size: 24px; font-weight: 800; line-height: 1; }
.tut-hero__stat span { font-size: 13px; color: rgba(255,255,255,.65); margin-top: 4px; }
.tut-hero__stat + .tut-hero__stat { padding-left: 26px; border-left: 1px solid rgba(255,255,255,.14); }

/* ============================================================
   PLAYLIST DE AULAS (index) — lista compacta estilo curso
   ============================================================ */
.tut-track-wrap { padding: 44px 0 72px; }
.tut-track-head {
  margin-bottom: 22px;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.tut-track-head h2 { font-size: 22px; font-weight: 800; color: var(--tut-ink); margin: 0 0 4px; }
.tut-track-head p { color: var(--tut-muted); margin: 0; font-size: 15px; }
.tut-track-head__count {
  font-size: 13px; font-weight: 700; color: var(--tut-accent);
  background: #e3fbf5; border: 1px solid #c4f0e8;
  padding: 6px 14px; border-radius: 999px; white-space: nowrap;
}

.tut-playlist {
  background: var(--tut-surface);
  border: 1px solid var(--tut-line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(10, 42, 45, .06);
}
.tut-pl-item {
  display: grid;
  grid-template-columns: 46px 132px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  text-decoration: none;
  color: inherit;
  border-top: 1px solid var(--tut-line);
  transition: background .14s ease;
}
.tut-pl-item:first-child { border-top: 0; }
.tut-pl-item:hover { background: var(--tut-soft); }

.tut-pl-num {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  font-weight: 800; font-size: 15px;
  color: var(--tut-accent);
  background: #e3fbf5;
  transition: background .14s ease, color .14s ease;
}
.tut-pl-item:hover .tut-pl-num { background: var(--tut-grad); color: #fff; }

.tut-pl-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #0a2a2d;
}
.tut-pl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tut-pl-thumb--ph {
  display: flex; align-items: center; justify-content: center;
  background: var(--tut-grad); color: rgba(255,255,255,.9);
}
.tut-pl-thumb__play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; opacity: 0; transition: opacity .14s ease;
}
.tut-pl-thumb__play svg {
  background: rgba(11,16,32,.6); border-radius: 50%; padding: 9px;
  width: 34px; height: 34px;
}
.tut-pl-item:hover .tut-pl-thumb__play { opacity: 1; }

.tut-pl-body { min-width: 0; }
.tut-pl-module {
  font-size: 11.5px; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; color: var(--tut-accent);
}
.tut-pl-title { font-size: 16px; font-weight: 700; color: var(--tut-ink); margin: 2px 0 0; line-height: 1.35; }
.tut-pl-excerpt {
  font-size: 13px; color: var(--tut-muted); line-height: 1.5; margin: 4px 0 0;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.tut-pl-right { display: flex; align-items: center; gap: 14px; color: var(--tut-muted); }
.tut-pl-dur { font-size: 13px; font-weight: 600; white-space: nowrap; }
.tut-pl-chev { color: var(--tut-accent); display: flex; }

/* ============================================================
   PÁGINA DA AULA — layout de curso (player + currículo lateral)
   ============================================================ */
.tut-course { padding: 36px 0 64px; }
.tut-course__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
}
.tut-course__main { min-width: 0; }

.tut-lesson-head { margin-bottom: 20px; }
.tut-lesson-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--tut-accent);
  background: #e3fbf5;
  border: 1px solid #c4f0e8;
  padding: 5px 12px;
  border-radius: 999px;
}
.tut-lesson-badge b { color: var(--tut-ink); }
.tut-lesson-head__module {
  margin-left: 10px;
  font-size: 12.5px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; color: var(--tut-muted);
}
.tut-lesson-title {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--tut-ink);
  line-height: 1.15;
  margin: 12px 0 8px;
}
.tut-lesson-lead { font-size: 17px; color: var(--tut-muted); line-height: 1.5; margin: 0; }

/* navegação anterior/próxima */
.tut-lesson-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 32px;
}
.tut-lesson-nav__item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 16px;
  border: 1px solid var(--tut-line);
  border-radius: 14px;
  text-decoration: none;
  color: var(--tut-ink);
  transition: border-color .15s ease, background .15s ease;
}
.tut-lesson-nav__item:hover { border-color: #9fe3d8; background: var(--tut-soft); }
.tut-lesson-nav__item--next { text-align: right; align-items: flex-end; }
.tut-lesson-nav__item--empty { visibility: hidden; }
.tut-lesson-nav__dir { font-size: 12px; font-weight: 700; color: var(--tut-accent); text-transform: uppercase; letter-spacing: .04em; }
.tut-lesson-nav__name { font-size: 14.5px; font-weight: 600; }

/* ---------- Currículo (aside) ---------- */
.tut-curriculum {
  position: sticky;
  top: 90px;
  background: var(--tut-surface);
  border: 1px solid var(--tut-line);
  border-radius: 18px;
  overflow: hidden;
}
.tut-curriculum__head {
  padding: 18px 20px;
  background: linear-gradient(160deg, #0a2a2d, #0f3a3e);
  color: #fff;
}
.tut-curriculum__head h2 { font-size: 16px; font-weight: 800; margin: 0 0 10px; }
.tut-curriculum__count { font-size: 12.5px; color: rgba(255,255,255,.7); }
.tut-progress {
  margin-top: 12px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.15);
  overflow: hidden;
}
.tut-progress__bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #5eead4, #14b8a6); }
.tut-curriculum__pos { display: block; font-size: 12px; color: rgba(255,255,255,.7); margin-top: 8px; }

.tut-curriculum__list { list-style: none; margin: 0; padding: 8px; max-height: 60vh; overflow: auto; }
.tut-curriculum__item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--tut-ink);
  transition: background .14s ease;
}
.tut-curriculum__item:hover { background: var(--tut-soft); }
.tut-curriculum__item.is-current { background: #e3fbf5; }
.tut-curriculum__ic {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9px;
  font-weight: 800; font-size: 13px;
  background: #e3fbf5; color: var(--tut-accent);
}
.tut-curriculum__item.is-current .tut-curriculum__ic { background: var(--tut-grad); color: #fff; }
.tut-curriculum__tx { min-width: 0; }
.tut-curriculum__t { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.tut-curriculum__d { font-size: 11.5px; color: var(--tut-muted); margin-top: 2px; }
.tut-curriculum__item.is-current .tut-curriculum__t { color: var(--tut-accent); }

/* ============================================================
   PLAYER (facade click-to-load) + corpo do tutorial
   ============================================================ */
.tut-player { margin: 0 0 26px; }
.tut-video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background: #0a2a2d;
  cursor: pointer;
  box-shadow: 0 20px 50px rgba(10, 42, 45, .24);
}
.tut-video__thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.tut-video__play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; }
.tut-video__play svg {
  width: 76px; height: 76px;
  background: var(--tut-grad);
  border-radius: 50%;
  padding: 19px;
  box-shadow: 0 10px 34px rgba(20, 184, 166, .55);
  transition: transform .18s ease;
}
.tut-video:hover .tut-video__play svg,
.tut-video:focus-visible .tut-video__play svg { transform: scale(1.07); }
.tut-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tut-video--soon { cursor: default; box-shadow: none; border: 1px dashed rgba(255,255,255,.18); }
.tut-video__soon-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; text-align: center; padding: 24px;
  color: rgba(255,255,255,.9);
}
.tut-video__soon-inner p { max-width: 420px; font-size: 15px; margin: 0; }

/* corpo / tipografia do tutorial */
.tut-body { font-size: 17px; line-height: 1.72; color: #38415c; }
.tut-body h2 {
  font-size: 23px; font-weight: 800; color: var(--tut-ink);
  margin: 34px 0 12px; line-height: 1.25;
  padding-left: 14px;
  border-left: 4px solid var(--tut-accent);
}
.tut-body h3 { font-size: 18px; font-weight: 700; color: var(--tut-ink-2); margin: 24px 0 8px; }
.tut-body p { margin: 0 0 16px; }
.tut-body ul, .tut-body ol { margin: 0 0 18px; padding-left: 4px; list-style: none; }
.tut-body ol { counter-reset: tut-ol; }
.tut-body ul li, .tut-body ol li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.tut-body ul li::before {
  content: "";
  position: absolute; left: 4px; top: 9px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--tut-accent-3);
}
.tut-body ol li::before {
  counter-increment: tut-ol;
  content: counter(tut-ol);
  position: absolute; left: 0; top: 1px;
  width: 21px; height: 21px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  border-radius: 6px;
  background: #e3fbf5; color: var(--tut-accent);
}
.tut-body strong { color: var(--tut-ink); }
.tut-body a { color: var(--tut-accent); }

/* CTA pública */
.tut-cta {
  margin: 34px 0 0;
  background:
    radial-gradient(500px 200px at 100% 0%, rgba(94,234,212,.28), transparent 60%),
    linear-gradient(135deg, #14b8a6, #0d9488);
  color: #fff;
  border-radius: 18px;
  padding: 28px 30px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  justify-content: space-between;
}
.tut-cta h3 { margin: 0 0 4px; font-size: 20px; }
.tut-cta p { margin: 0; opacity: .92; font-size: 15px; }
.tut-cta .fa-btn { white-space: nowrap; }

/* estado vazio */
.tut-empty {
  text-align: center;
  padding: 56px 24px;
  color: var(--tut-muted);
  border: 1px dashed var(--tut-line);
  border-radius: 16px;
}

/* ============================================================
   ÁREA LOGADA (layout app) — versão enxuta, mesma linguagem
   ============================================================ */
.app-tut-header { margin-bottom: 18px; }
.app-tut-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--tut-accent);
  text-decoration: none; margin-bottom: 14px;
}
.app-tut-back:hover { text-decoration: underline; }

/* ============================================================
   BOTÃO "ASSISTIR TUTORIAL DESTA TELA" + MODAL DE VÍDEO
   Injetado no topo de cada tela do sistema.
   ============================================================ */
.screen-tut-bar {
  display: none;
  justify-content: flex-end;
  margin: 0 0 16px;
}
.screen-tut-bar.is-visible { display: flex; }
.screen-tut-btn {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 9px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 700;
  color: #0f766e;
  background: #ffffff;
  border: 1.5px solid var(--tut-accent, #14b8a6);
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
  transition: color .16s ease, background .16s ease, transform .16s ease;
  animation: screenTutPulse 2.2s ease-in-out infinite;
}
.screen-tut-btn:hover {
  background: var(--tut-grad, linear-gradient(135deg, #14b8a6, #22d3a1));
  color: #fff;
  transform: translateY(-1px);
  animation-play-state: paused;
}
.screen-tut-btn__icon {
  display: flex;
  width: 22px; height: 22px;
  align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--tut-grad, linear-gradient(135deg, #14b8a6, #22d3a1));
  color: #fff;
  flex: none;
}
.screen-tut-btn:hover .screen-tut-btn__icon { background: rgba(255,255,255,.22); }

/* borda piscante leve */
@keyframes screenTutPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(20, 184, 166, .0); border-color: rgba(20, 184, 166, .55); }
  50%      { box-shadow: 0 0 0 5px rgba(20, 184, 166, .14); border-color: #14b8a6; }
}
@media (prefers-reduced-motion: reduce) {
  .screen-tut-btn { animation: none; }
}

/* ---------- Modal ---------- */
.tut-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.tut-modal.is-open { display: flex; }
.tut-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 24, .72);
  backdrop-filter: blur(4px);
  animation: tutFade .2s ease;
}
.tut-modal__card {
  position: relative;
  width: min(900px, 100%);
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(8, 12, 24, .45);
  animation: tutPop .22s cubic-bezier(.2, .8, .25, 1);
}
.tut-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--tut-line, #e7e9f4);
}
.tut-modal__title { font-size: 16px; font-weight: 800; color: var(--tut-ink, #0b1020); margin: 0; }
.tut-modal__close {
  flex: none;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 9px;
  background: #f1f5f9; color: #475569;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.tut-modal__close:hover { background: #e2e8f0; color: #0f172a; }
.tut-modal__video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0a2a2d;
}
.tut-modal__video iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%; border: 0;
}
.tut-modal__soon {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.85); text-align: center; padding: 24px; font-size: 15px;
}
.tut-modal__foot {
  padding: 14px 20px;
  display: flex; justify-content: flex-end;
}
.screen-tut-link { font-size: 14px; font-weight: 700; color: var(--tut-accent, #14b8a6); text-decoration: none; }
.screen-tut-link:hover { text-decoration: underline; }

@keyframes tutFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tutPop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Responsivo ---------- */
@media (max-width: 980px) {
  .tut-course__grid { grid-template-columns: 1fr; }
  .tut-curriculum { position: static; }
  .tut-curriculum__list { max-height: none; }
}
@media (max-width: 640px) {
  .tut-pl-item { grid-template-columns: 38px 1fr auto; gap: 12px; padding: 12px 14px; }
  .tut-pl-thumb, .tut-pl-excerpt { display: none; }
  .tut-pl-right { gap: 8px; }
  .tut-hero__stat + .tut-hero__stat { padding-left: 0; border-left: 0; }
  .tut-hero__stats { gap: 18px; }
  .tut-cta { flex-direction: column; align-items: flex-start; }
  .tut-body { font-size: 16px; }
  .tut-lesson-nav { grid-template-columns: 1fr; }
}
