/* =========================================================
   Viés Claro — utilitários de layout editorial
   Classes vc-* para ribbons, cards, grids e headers densos.
   ========================================================= */

/* Bias ribbon — thin tricolor strip */
.vc-ribbon {
    display: grid;
    grid-template-columns: var(--l, 33%) var(--c, 34%) var(--r, 33%);
    height: 6px;
    width: 100%;
}
.vc-ribbon > span:nth-child(1) { background: var(--left); }
.vc-ribbon > span:nth-child(2) { background: var(--center); }
.vc-ribbon > span:nth-child(3) { background: var(--right); }
.vc-ribbon.tall { height: 12px; }

/* Bias ticks — integer percentages below ribbon */
.vc-ticks {
    display: flex;
    justify-content: space-between;
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.06em;
    color: var(--ink-3);
    margin-top: 6px;
}
.vc-ticks .lv { color: var(--left); }
.vc-ticks .cv { color: var(--center-ink); }
.vc-ticks .rv { color: var(--right); }

/* Bias LCR — three labeled segments (N Esq · N Centro · N Dir) — mesmo formato
   usado nas "Histórias relacionadas" do detalhe de story. Cada segmento tem
   borda direita como separador, exceto o último. */
.vc-lcr {
    display: flex;
    margin-top: 12px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.vc-lcr > span {
    padding: 4px 8px;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    border-right: 1px solid var(--rule);
}
/* Primeiro e último spans encostam nas bordas do container pai, pra alinhar
   com título/meta do card que têm só o padding do body. */
.vc-lcr > span:first-child { padding-left: 0; }
.vc-lcr > span:last-child { padding-right: 0; border-right: 0; }
.vc-lcr em { font-style: normal; font-weight: 700; color: var(--ink); }
.vc-lcr .l { color: var(--left); }
.vc-lcr .c { color: var(--center-ink); }
.vc-lcr .r { color: var(--right); }

/* Bias bar (labeled) */
.vc-bar {
    display: grid;
    grid-template-columns: var(--l) var(--c) var(--r);
    height: 36px;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    width: 100%;
}
.vc-bar > span { display: flex; align-items: center; justify-content: center; padding: 0 10px; }
.vc-bar .l { background: var(--left); }
.vc-bar .c { background: var(--center); color: oklch(0.25 0.08 75); }
.vc-bar .r { background: var(--right); }
.vc-bar.tall { height: 52px; font-size: 14px; }

/* Ponto cego chip */
.vc-blind {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 3px 9px;
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    background: var(--ink);
    border-radius: 2px;
    font-weight: 600;
}
.vc-blind.l { background: var(--left); }
.vc-blind.r { background: var(--right); }
.vc-blind .ico { width: 13px; height: 13px; }

/* Story card editorial */
.vc-story-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--rule);
    text-decoration: none;
    color: var(--ink);
    transition: border-color 0.15s;
}
.vc-story-card:hover { border-color: var(--ink-3); }
.vc-story-card .img {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--bg-soft);
    background-image: linear-gradient(135deg, oklch(0.88 0.03 90) 0%, oklch(0.82 0.04 60) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    color: var(--ink-3);
    text-transform: uppercase;
    overflow: hidden;
}

/* P0+P2: capa como <img loading=lazy> em vez de background-image — permite
   ao browser pular o download de cards abaixo da dobra e habilita o
   image-set preloader. object-fit:cover preserva o framing 16:9. */
.vc-story-card .img > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.vc-story-card .img > .img-meta {
    z-index: 1;
}

/* Overlay com N artigos · tempo sobreposto no canto inferior da foto.
   Background preto translúcido com texto branco — contrasta bem com
   fotos (geralmente com áreas claras) em ambos os temas. Também serve
   como sd-related__img quando referenciado via .img-meta genérica. */
.img-meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 8px 12px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.75) 60%, rgba(0, 0, 0, 0.85) 100%);
    color: #fff;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    pointer-events: none;
}
.img-meta .dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    flex: none;
}
.vc-story-card .body {
    padding: 16px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.vc-story-card .foot {
    margin-top: auto;
    padding-top: 14px;
}
/* LCR quando usado como rodapé do card: cola no final, independente da
   altura variável do título/meta acima. */
.vc-story-card .body .vc-lcr {
    margin-top: auto;
}

/* Cards sem foto (Mais histórias por editoria): topic + meta dividem a
   mesma linha no topo do body — topic à esquerda, meta (N artigos · tempo)
   à direita. */
.vc-story-card .body .topic-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.vc-story-card .topic {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 8px;
}
.vc-story-card h3 {
    font-family: var(--serif);
    font-size: 20px;
    line-height: 1.22;
    font-weight: 600;
    margin: 0 0 10px;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.vc-story-card h3.xl { font-size: 28px; line-height: 1.15; }
.vc-story-card h3.xxl { font-size: 38px; line-height: 1.08; letter-spacing: -0.02em; }
.vc-story-card .meta {
    font-family: var(--mono);
    font-size: 10.5px;
    color: var(--ink-3);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.vc-story-card .meta .dot {
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: var(--ink-4);
    display: inline-block;
}

/* Section header */
.vc-section-h {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0 48px;
    margin: 40px 0 16px;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 10px;
}
.vc-section-h h2 {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 600;
    margin: 0;
    color: var(--ink);
}
.vc-section-h .meta {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-3);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Grids */
.vc-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 0 48px; }
.vc-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 0 48px; }
.vc-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; padding: 0 48px; }

@media (max-width: 1024px) {
    .vc-section-h { padding: 0 24px; margin: 28px 0 12px; }
    .vc-grid-4 { grid-template-columns: repeat(2, 1fr); padding: 0 24px; }
    .vc-grid-3 { grid-template-columns: 1fr; padding: 0 24px; }
    .vc-grid-2 { grid-template-columns: 1fr; padding: 0 24px; }
}

@media (max-width: 640px) {
    .vc-grid-4 { grid-template-columns: 1fr; }
}
