/* =====================================================================
   CONTEÚDOS — DESTAQUES (home) — 10/11/2026
   A grade de 10 cartões (3–4 linhas no desktop, 10 no celular) virou um
   trilho horizontal: filtros por categoria, arrastar/rolar com encaixe,
   setas, barra de progresso e avanço automático suave quando ninguém mexe.
   Mantém .content-grid / .content-card[data-content-type="embed"] para o
   content-cards.js continuar abrindo a prévia no painel lateral.
   Cartões no tamanho nativo das imagens (341×200), sem ampliar.
   ===================================================================== */

.content-section.cs-novo {
    --cs-g: max(clamp(16px, 4vw, 48px), calc((100% - 1360px) / 2));
    max-width: none;
    margin: 0;
    padding: clamp(56px, 7vw, 104px) 0 clamp(48px, 6vw, 88px);
    background: var(--color-bg-primary, #f5f5f7);
    overflow: hidden;
}

/* ---------- topo: título + filtros ---------- */
.cs-topo {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px 40px;
    padding: 0 var(--cs-g);
}
.cs-topo__txt { min-width: 0; max-width: 640px; }
.cs-novo .section-title {
    margin: 0;
    font-size: clamp(30px, 3.2vw, 48px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.022em;
    color: #1d1d1f;
}
.cs-novo .section-title .gray-text { color: #8a8a8f; }
.cs-topo__desc { margin: 12px 0 0; font-size: clamp(15px, 1.15vw, 18px); line-height: 1.5; color: #6e6e73; }

.cs-filtros { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-filtro {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 99px;
    background: #fff;
    color: #1d1d1f;
    font: inherit;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.cs-filtro span {
    display: grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 99px;
    background: #f0f0f2;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: #6e6e73;
    transition: background 0.25s, color 0.25s;
}
.cs-filtro:hover { border-color: rgba(0, 0, 0, 0.22); }
.cs-filtro.is-on { background: #1d1d1f; border-color: #1d1d1f; color: #f4f1ea; }
.cs-filtro.is-on span { background: rgba(255, 255, 255, 0.16); color: #f4f1ea; }
.cs-filtro:focus-visible { outline: 3px solid #1d1d1f; outline-offset: 2px; }

/* ---------- trilho ---------- */
.cs-trilho {
    position: relative;
    margin-top: clamp(24px, 3vw, 40px);
}
.cs-novo .content-grid {
    display: flex;
    gap: clamp(12px, 1.2vw, 18px);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--cs-g);
    padding: 10px var(--cs-g) 22px;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    grid-template-columns: none;
}
.cs-novo .content-grid::-webkit-scrollbar { display: none; }
.cs-novo .content-grid.is-arrasto { scroll-snap-type: none; cursor: grabbing; }
.cs-novo .content-grid.is-arrasto .content-card { pointer-events: none; }

/* ---------- cartão ---------- */
.cs-novo .content-card {
    flex: 0 0 clamp(264px, 24vw, 341px);
    height: auto;
    aspect-ratio: 341 / 200;
    scroll-snap-align: start;
    border-radius: 18px;
    background: #1d1d1f;
    overflow: hidden;
    isolation: isolate;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 14px 30px -22px rgba(0, 0, 0, 0.45);
    transition: transform 0.45s cubic-bezier(.22, 1, .36, 1), box-shadow 0.45s, opacity 0.35s;
    user-select: none;
    -webkit-user-select: none;
}
.cs-novo .content-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    transition: scale 0.7s cubic-bezier(.22, 1, .36, 1);
    -webkit-user-drag: none;
}
/* véu para o texto ler bem em qualquer foto */
.cs-novo .content-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.18) 58%, transparent 80%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.55) 0%, transparent 55%);
}
.cs-novo .content-card h3 {
    position: absolute;
    top: auto;
    left: 18px;
    right: 18px;
    bottom: 52px;
    max-width: 66%;
    margin: 0;
    font-size: clamp(20px, 1.65vw, 25px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: #fff;
    text-wrap: balance;
}
.cs-novo .content-card p {
    position: absolute;
    left: 18px;
    bottom: 16px;
    max-width: 64%;
    margin: 0;
    font-size: 12.5px;
    font-weight: 400;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.82);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: opacity 0.3s, translate 0.35s;
}
.cs-card__n {
    position: absolute;
    top: 14px;
    left: 18px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.7);
}
.cs-card__cta {
    position: absolute;
    left: 18px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 99px;
    background: #f4f1ea;
    color: #1d1d1f;
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    translate: 0 8px;
    transition: opacity 0.3s, translate 0.35s cubic-bezier(.22, 1, .36, 1);
}
.cs-card__cta::after { content: "↗"; font-size: 1.05em; line-height: 1; }

@media (hover: hover) {
    .cs-novo .content-card:hover { transform: translateY(-6px); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 26px 44px -26px rgba(0, 0, 0, 0.55); }
    .cs-novo .content-card:hover img { scale: 1.07; }
    .cs-novo .content-card:hover p { opacity: 0; translate: 0 6px; }
    .cs-novo .content-card:hover .cs-card__cta { opacity: 1; translate: 0 0; }
    .cs-novo .content-grid:hover .content-card:not(:hover) { opacity: 0.72; }
}
.cs-novo .content-card:focus-visible { outline: 3px solid #1d1d1f; outline-offset: 3px; }
.cs-novo .content-card:focus-visible p { opacity: 0; }
.cs-novo .content-card:focus-visible .cs-card__cta { opacity: 1; translate: 0 0; }

/* filtro: cartões fora somem; os que ficam entram de novo */
.cs-novo .content-card.is-fora { display: none; }
.cs-novo .content-card.is-entra { animation: cs-entra 0.55s cubic-bezier(.22, 1, .36, 1) both; animation-delay: calc(var(--cs-i, 0) * 50ms); }
@keyframes cs-entra { from { opacity: 0; transform: translateX(28px) scale(0.97); } to { opacity: 1; transform: none; } }

/* ---------- controles: progresso + setas ---------- */
.cs-ctrl {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px var(--cs-g) 0;
}
.cs-barra { position: relative; flex: 1; height: 3px; margin-right: 14px; border-radius: 99px; background: rgba(0, 0, 0, 0.1); overflow: hidden; }
.cs-barra i { position: absolute; top: 0; bottom: 0; left: 0; width: 30%; border-radius: inherit; background: #1d1d1f; transition: left 0.25s, width 0.25s; }
.cs-seta {
    position: relative;
    flex: none;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    transition: background 0.25s, border-color 0.25s, opacity 0.25s;
}
.cs-seta::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 9px;
    height: 9px;
    border: solid #1d1d1f;
    border-width: 2px 2px 0 0;
    translate: -65% -50%;
    rotate: 45deg;
    transition: border-color 0.25s;
}
.cs-seta--ant::before { rotate: -135deg; translate: -35% -50%; }
.cs-seta:hover:not(:disabled) { background: #1d1d1f; border-color: #1d1d1f; }
.cs-seta:hover:not(:disabled)::before { border-color: #f4f1ea; }
.cs-seta:disabled { opacity: 0.35; cursor: default; }
.cs-seta:focus-visible { outline: 3px solid #1d1d1f; outline-offset: 2px; }

@media (max-width: 768px) {
    .cs-novo .content-card { flex-basis: min(78vw, 320px); height: auto; }
    .cs-novo .content-card h3 { font-size: 22px; max-width: 70%; }
    .cs-filtros { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--cs-g)); padding: 2px var(--cs-g); scrollbar-width: none; width: calc(100% + 2 * var(--cs-g)); }
    .cs-filtros::-webkit-scrollbar { display: none; }
    .cs-filtro { flex: none; }
    .cs-seta { width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
    .cs-novo .content-card,
    .cs-novo .content-card img,
    .cs-novo .content-card p,
    .cs-card__cta,
    .cs-barra i { transition: none; }
    .cs-novo .content-card.is-entra { animation: none; }
    .cs-novo .content-card:hover { transform: none; }
    .cs-novo .content-card:hover img { scale: none; }
}
