﻿  /* ============================================================
     PÁGINA DE TRILHA v4 — Tokens oficiais (design.md beta)
     Hero estilo percurso v3 (faixa verde + stats + chip).
     Corpo mantido da trilha v3.
     ============================================================ */

  /* Estilos estruturais, resets e tokens movidos para o shell.css compartilhado */



  /* Header e breadcrumb: estilos no shell.css compartilhado */

  .container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad-x); }

  /* ============================================================
     HERO — faixa verde com painel de stats e chip de trilha
     (referência: página de percurso v3)
     ============================================================ */
  .hero-trilha { background: var(--verde-palido); color: var(--ink); position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
  /* ícone de trilha gigante, vazado, ao fundo */
  .hero-bg-icon {
    position: absolute; left: -50px; top: 50%; transform: translateY(-50%);
    width: 520px; height: 300px; object-fit: contain; color: var(--verde-marca); opacity: .10;
    pointer-events: none; z-index: 0;
  }
  @media (max-width: 700px) { .hero-bg-icon { width: 360px; height: 210px; left: -90px; } }
  .hero-trilha-inner {
    position: relative; z-index: 1;
    max-width: var(--maxw); margin: 0 auto; padding: 40px var(--pad-x) 44px;
    display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center;
  }
  @media (max-width: 860px) { .hero-trilha-inner { grid-template-columns: 1fr; gap: 28px; } }
  .hero-main { min-width: 0; }

  /* Chip de trilha — pílula verde-marca com ícone de trilha (destaque sobre fundo pálido) */
  .hero-kicker {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 8px 20px 8px 15px; margin: 0 0 18px;
    background: var(--verde-profundo); border: 1px solid var(--verde-profundo);
    border-radius: 99px;
    font-size: .82rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: #fff;
  }
  [data-theme="dark"] .hero-kicker { color: var(--bg); }
  .hero-kicker svg { width: 20px; height: 20px; }

  .hero-trilha h1 {
    font-size: 2.8rem; line-height: 1.06; font-weight: 700; letter-spacing: -.02em;
    margin: 0 0 16px; color: var(--verde-profundo);
  }
  @media (max-width: 700px) { .hero-trilha h1 { font-size: 2.1rem; } }
  .hero-trilha .subtitle {
    font-size: 1.06rem; line-height: 1.55; margin: 0;
    color: var(--verde-profundo); max-width: 60ch;
  }

  /* Painel de stats à direita, com divisória vertical */
  .hero-stats {
    border-left: 1px solid var(--line-2);
    padding-left: 28px; min-width: 190px;
    display: flex; flex-direction: column; gap: 16px;
  }
  @media (max-width: 860px) {
    .hero-stats { border-left: 0; border-top: 1px solid var(--line-2); padding-left: 0; padding-top: 24px; }
  }
  .hero-stat .label {
    display: block; font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: var(--verde-marca); margin: 0 0 3px;
  }
  .hero-stat .value { font-size: 1.15rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
  .hero-stat a.value-link {
    font-size: .95rem; font-weight: 600; color: var(--verde-marca); text-decoration: none;
    display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  }
  .hero-stat a.value-link:hover { color: var(--verde-profundo); }
  .hero-stat a.value-link svg { width: 14px; height: 14px; }

  /* Vínculo de percurso — cor reservada verde-profundo (Decisão 31).
     Renderizar SOMENTE quando a trilha pertence a ≥1 percurso. */
  .hero-stat--percurso .label { color: var(--verde-profundo); }
  [data-theme="dark"] .hero-stat--percurso .label { color: var(--verde-claro); }
  .percurso-link {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 1rem; font-weight: 700; color: var(--verde-profundo);
    text-decoration: none; line-height: 1.25;
  }
  [data-theme="dark"] .percurso-link { color: var(--verde-claro); }
  .percurso-link .pl-ico { width: 17px; height: 17px; flex-shrink: 0; }
  .percurso-link .pl-chev { width: 13px; height: 13px; flex-shrink: 0; opacity: .7; transition: transform .15s; }
  .percurso-link:hover { color: var(--verde-marca); }
  .percurso-link:hover .pl-chev { transform: translateX(3px); }

  /* ============================================================
     SEÇÕES
     ============================================================ */
  .main-stack { padding: 40px 0 56px; }
  .main-stack > section + section { margin-top: 52px; }

  .section-eyebrow {
    font-size: 1.10rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
    color: var(--ink-3); margin: 0 0 20px;
  }

  /* ============================================================
     SEQUÊNCIA — timeline vertical conectada
     ============================================================ */
  .sequencia-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
  .seq-item {
    display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.1fr) 200px; gap: 22px;
    padding: 18px 0; position: relative; align-items: stretch;
  }
  .seq-item:not(:first-child) { border-top: 1px solid var(--line); }

  /* Coluna 1 — caixa de CATEGORIA: cor de fundo + ícone branco (padrão da home, .card-illust) */
  .seq-illust {
    align-self: stretch; min-height: 60px;
    border-radius: 14px; display: grid; place-items: center; overflow: hidden;
  }
  .seq-illust img {
    width: 48%; max-width: 36px; height: auto; opacity: .95;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.12));
  }
  .seq-item[data-category="ferramentas"]    .seq-illust { background: var(--cat-ferramentas); }
  .seq-item[data-category="gestao-moodle"]  .seq-illust { background: var(--cat-gestao-moodle); }
  .seq-item[data-category="pedagogia"]      .seq-illust { background: var(--cat-pedagogia); }
  .seq-item[data-category="acessibilidade"] .seq-illust { background: var(--cat-acessibilidade); }
  .seq-item[data-category="conduta"]        .seq-illust { background: var(--cat-conduta); }
  .seq-item[data-category="identidade"]     .seq-illust { background: var(--cat-identidade); }

  /* Coluna 2 — TÍTULO (prioridade visual) */
  .seq-title {
    align-self: start;
    font-size: 1.34rem; font-weight: 700; color: var(--ink);
    line-height: 1.28; display: block; letter-spacing: -.015em; padding-top: 2px;
  }
  .seq-item:hover .seq-title { color: var(--verde-marca); }

  /* Coluna 3 — SUBTÍTULO (fonte menor) */
  .seq-sub {
    align-self: start; margin: 0; padding-top: 4px;
    font-size: .88rem; color: var(--ink-2); line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  }

  /* Coluna 4 — demais informações (categoria, tipo, tempo) — SEM cor de categoria */
  .seq-info {
    align-self: start;
    display: grid; grid-template-columns: auto auto; justify-content: start;
    align-items: center; gap: 9px 10px;
    padding-top: 4px; white-space: nowrap;
  }
  /* Nome da categoria em texto neutro — a cor vive na caixa do início */
  .seq-cat-name {
    grid-column: 1 / -1; justify-self: start;
    font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: var(--ink-3);
  }
  .seq-time {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .8rem; color: var(--ink-3); font-variant-numeric: tabular-nums;
  }
  .seq-time svg { width: 13px; height: 13px; color: var(--ink-3); }

  /* Badge de tipo — fundo neutro (DS §components/badge-tipo) */
  .badge-tipo {
    padding: 4px 12px; border-radius: 99px; font-weight: 600;
    font-size: .72rem; letter-spacing: .02em;
    background: var(--bg-2); color: var(--ink-2);
  }

  @media (max-width: 860px) {
    .seq-item { grid-template-columns: 56px 1fr; gap: 10px 16px; align-items: start; }
    .seq-illust { min-height: 56px; }
    .seq-sub  { grid-column: 2; padding-top: 2px; }
    .seq-info { grid-column: 2; display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding-top: 6px; }
    .seq-cat-name { grid-column: auto; }
  }
  @media (max-width: 700px) {
    .seq-item { grid-template-columns: 48px 1fr; }
  }

  /* CTA começar */
  .start-cta {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--verde-marca); color: #fff;
    padding: 12px 22px; border-radius: var(--r-md);
    font-weight: 600; margin: 26px 0 0;
    transition: background .15s, transform .15s;
  }
  .start-cta:hover { background: var(--verde-profundo); transform: translateY(-1px); }
  [data-theme="dark"] .start-cta { color: var(--bg); }
  .start-cta svg { width: 15px; height: 15px; }

  /* ============================================================
     TRILHAS RELACIONADAS — cards (padrão catálogo) + carrossel
     ============================================================ */
  .related-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
  .related-head .section-eyebrow { margin: 0; }
  .carousel-nav { display: flex; gap: 8px; }
  .carousel-btn {
    width: 40px; height: 40px; border-radius: 99px;
    border: 1px solid var(--line-2); background: var(--paper);
    color: var(--ink-2); cursor: pointer; display: grid; place-items: center;
    transition: all .15s;
  }
  .carousel-btn:hover { border-color: var(--verde-marca); color: var(--verde-marca); background: var(--verde-palido); }
  .carousel-btn svg { width: 18px; height: 18px; }

  /* .related-grid herdado do shell.css */

  .card {
    background: var(--paper); border: 1px solid var(--line);
    border-radius: var(--r-lg); overflow: hidden;
    display: flex; flex-direction: column;
    transition: transform .2s ease, border-color .15s, box-shadow .15s;
  }
  .card:hover { border-color: var(--verde-claro); transform: translateY(-2px); box-shadow: var(--shadow-md); }

  /* Card de TRILHA — skin verde-palido unico (igual a pagina de percurso).
     Trilha cruza categorias, entao nao recebe cor de categoria. */
  .card-illust { aspect-ratio: 16 / 7; display: grid; place-items: center; position: relative; overflow: hidden; background: var(--verde-palido); }
  .card-illust svg { width: 30%; height: auto; max-width: 84px; color: var(--verde-profundo); }
  [data-theme="dark"] .card-illust svg { color: var(--verde-marca); }
  .card-illust img { width: 62%; height: auto; max-width: 180px; opacity: .95; filter: drop-shadow(0 2px 6px rgba(0,0,0,.08)); }
  .card[data-category="ferramentas"]    .card-illust { background: var(--cat-ferramentas); }
  .card[data-category="gestao-moodle"]  .card-illust { background: var(--cat-gestao-moodle); }
  .card[data-category="pedagogia"]      .card-illust { background: var(--cat-pedagogia); }
  .card[data-category="acessibilidade"] .card-illust { background: var(--cat-acessibilidade); }
  .card[data-category="conduta"]        .card-illust { background: var(--cat-conduta); }
  .card[data-category="identidade"]     .card-illust { background: var(--cat-identidade); }

  .card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
  .card-kicker { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
  .card h3 { margin: 0; font-size: 1.12rem; font-weight: 700; line-height: 1.3; color: var(--ink); letter-spacing: -.005em; }
  .card-desc { font-size: .92rem; color: var(--ink-2); line-height: 1.55; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .card-stats { margin-top: auto; padding-top: 12px; display: flex; gap: 28px; }
  .card-stat { display: flex; flex-direction: column; gap: 3px; }
  .card-stat .lab { font-size: .64rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
  .card-stat .val { font-size: .98rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }

  /* ============================================================
     DETALHE EDITORIAL COLAPSADO
     ============================================================ */
  .details-block {
    margin: 12px 0 0;
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
    overflow: hidden;
  }
  .details-block > summary {
    list-style: none; cursor: pointer; padding: 16px 22px;
    display: flex; align-items: center; justify-content: space-between;
    font-size: .92rem; color: var(--ink-2); font-weight: 600;
  }
  .details-block > summary::-webkit-details-marker { display: none; }
  .details-block > summary:hover { background: var(--bg-2); }
  .details-block > summary .chev { transition: transform .2s; width: 16px; height: 16px; }
  .details-block[open] > summary .chev { transform: rotate(180deg); }
  .details-body { padding: 4px 22px 22px; border-top: 1px solid var(--line); font-size: .92rem; color: var(--ink-2); line-height: 1.6; }
  .details-body p { margin: 14px 0 0; }
  .details-body strong { color: var(--ink); font-weight: 700; }

  /* Footer: estilos no shell.css compartilhado */
  @media (max-width: 600px) { :root { --pad-x: 20px; } }
