/* ==========================================================================
   Truques de Beleza - Redesign editorial 2026 (camada sobre theme.css)
   ========================================================================== */

:root {
    --tbd-bg: #fffdfa;
    --tbd-surface: #ffffff;
    --tbd-surface-2: #f6efe8;
    --tbd-text: #1d1a19;
    --tbd-muted: #716b67;
    --tbd-line: #e7e0da;
    --tbd-sand: #ede1d3;
    --tbd-taupe: #9c8165;
    --tbd-champagne: #b99a73;
    --tbd-accent: #b98c82;         /* rosa/taupe suave, acento minimo */
    --tbd-accent-dark: #9c6a60;
    --tbd-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    --tbd-radius: 6px;
    --tbd-shadow: 0 12px 40px rgba(45, 31, 25, 0.06);
    --tbd-maxw: 1280px;
}

html.tbd-dark {
    --tbd-bg: #14110f;
    --tbd-surface: #1c1815;
    --tbd-surface-2: #241f1b;
    --tbd-text: #f3ede7;
    --tbd-muted: #b3a89f;
    --tbd-line: rgba(255,255,255,0.12);
}

body.tbd-v3 { background: var(--tbd-bg); color: var(--tbd-text); }
body.tbd-v3 .tbd-container { max-width: var(--tbd-maxw); }

/* Titulos serifados editoriais */
body.tbd-v3 h1, body.tbd-v3 h2, body.tbd-v3 h3,
body.tbd-v3 .tbd-hero-card h1, body.tbd-v3 .tbd-overlay-card h2,
body.tbd-v3 .tbd-post-card h3, body.tbd-v3 .tbd-editoria__title,
body.tbd-v3 .tbd-section__heading h2 {
    font-family: var(--tbd-serif);
    font-weight: 600;
    letter-spacing: 0.01em;
}
body.tbd-v3 .tbd-logo { font-family: var(--tbd-serif); }

/* --------- Topbar --------- */
body.tbd-v3 .tbd-topbar { background: var(--tbd-surface); border-bottom: 1px solid var(--tbd-line); font-size: 13px; }
body.tbd-v3 .tbd-topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 0; }
body.tbd-v3 .tbd-topbar__meta { display: flex; gap: 14px; color: var(--tbd-muted); }
body.tbd-v3 .tbd-topbar__actions { display: flex; align-items: center; gap: 16px; }
body.tbd-v3 .tbd-topbar__links { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0; }
body.tbd-v3 .tbd-topbar__links a { color: var(--tbd-muted); text-decoration: none; font-weight: 500; }
body.tbd-v3 .tbd-topbar__links a:hover { color: var(--tbd-text); }
body.tbd-v3 .tbd-topbar .tbd-icon-button { width: 30px; height: 30px; color: var(--tbd-text); background: transparent; border: none; cursor: pointer; }
body.tbd-v3 .tbd-topbar .tbd-icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* --------- Mainbar / logo --------- */
body.tbd-v3 .tbd-mainbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 0; max-width: var(--tbd-maxw); }
body.tbd-v3 .tbd-mainbar .tbd-logo { font-size: clamp(26px, 3vw, 40px); line-height: .85; text-transform: uppercase; letter-spacing: 0; }
body.tbd-v3 .tbd-mainbar .tbd-logo em { color: var(--tbd-accent); }

/* --------- Menu principal: dropdown (classes padrao do WP) --------- */
body.tbd-v3 .tbd-nav__list { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
body.tbd-v3 .tbd-nav .menu-item { position: relative; }
body.tbd-v3 .tbd-nav .menu-item > a {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 10px 12px; color: var(--tbd-text); text-decoration: none;
    font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
}
body.tbd-v3 .tbd-nav .menu-item > a:hover { color: var(--tbd-accent-dark); }
body.tbd-v3 .tbd-nav .menu-item > a::after { display: none !important; }
body.tbd-v3 .tbd-nav .menu-item-has-children > a::after {
    content: ""; display: inline-block !important; position: static !important;
    width: 6px; height: 6px; margin-left: 4px; background: none !important;
    border: 0; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg); opacity: .55; transition: none !important;
}
body.tbd-v3 .tbd-subnav-toggle { display: none; }

body.tbd-v3 .tbd-nav .sub-menu {
    position: absolute; top: 100%; left: 0; min-width: 230px;
    background: var(--tbd-surface); border: 1px solid var(--tbd-line);
    box-shadow: var(--tbd-shadow); border-radius: var(--tbd-radius);
    list-style: none; margin: 0; padding: 8px; z-index: 60;
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
body.tbd-v3 .tbd-nav .menu-item-has-children:hover > .sub-menu,
body.tbd-v3 .tbd-nav .menu-item-has-children:focus-within > .sub-menu,
body.tbd-v3 .tbd-nav .menu-item-has-children.is-open > .sub-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
}
body.tbd-v3 .tbd-nav .sub-menu a {
    display: block; padding: 9px 12px; border-radius: 4px;
    color: var(--tbd-text); text-decoration: none; font-size: 14px; font-weight: 500;
    text-transform: none; letter-spacing: 0;
}
body.tbd-v3 .tbd-nav .sub-menu a:hover { background: var(--tbd-surface-2); color: var(--tbd-accent-dark); }

/* --------- Editorias na home --------- */
body.tbd-v3 .tbd-editorias { margin: 40px 0; }
body.tbd-v3 .tbd-editorias__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px; }
body.tbd-v3 .tbd-editorias + .tbd-editorias .tbd-editorias__grid { grid-template-columns: 1fr; }
body.tbd-v3 .tbd-editoria { display: flex; flex-direction: column; gap: 12px; }
body.tbd-v3 .tbd-editoria__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--tbd-line); padding-bottom: 8px; }
body.tbd-v3 .tbd-editoria__title { margin: 0; font-size: 20px; }
body.tbd-v3 .tbd-editoria__title a { color: var(--tbd-text); text-decoration: none; }
body.tbd-v3 .tbd-editoria__all { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--tbd-muted); text-decoration: none; white-space: nowrap; }
body.tbd-v3 .tbd-editoria__all:hover { color: var(--tbd-accent-dark); }
body.tbd-v3 .tbd-editoria__image { display: block; border-radius: var(--tbd-radius); overflow: hidden; aspect-ratio: 4 / 3; }
body.tbd-v3 .tbd-editoria__image img { width: 100%; height: 100%; object-fit: cover; }
body.tbd-v3 .tbd-editoria__links { list-style: none; margin: 0; padding: 0; }
body.tbd-v3 .tbd-editoria__links li { padding: 5px 0; border-bottom: 1px dotted var(--tbd-line); }
body.tbd-v3 .tbd-editoria__links a { color: var(--tbd-muted); text-decoration: none; font-size: 14px; }
body.tbd-v3 .tbd-editoria__links a:hover { color: var(--tbd-accent-dark); }
/* Bloco Bem-estar (segundo grupo, largura total) */
body.tbd-v3 .tbd-editorias + .tbd-editorias .tbd-editoria { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }
body.tbd-v3 .tbd-editorias + .tbd-editorias .tbd-editoria__head { grid-column: 1 / -1; }
body.tbd-v3 .tbd-editorias + .tbd-editorias .tbd-editoria__links { columns: 2; }

/* --------- Rodape editorial claro (unico) --------- */
body.tbd-v3 .tbd-footer--editorial { background: var(--tbd-surface); border-top: 1px solid var(--tbd-line); margin-top: 56px; color: var(--tbd-text); }
body.tbd-v3 .tbd-footer--editorial .tbd-footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr auto; gap: 32px; padding: 44px 0 28px; align-items: start; }
body.tbd-v3 .tbd-footer--editorial .tbd-logo--footer { font-size: 30px; line-height: .85; text-transform: uppercase; color: var(--tbd-text); text-decoration: none; }
body.tbd-v3 .tbd-footer--editorial .tbd-logo--footer em { color: var(--tbd-accent); }
body.tbd-v3 .tbd-footer__title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 12px; color: var(--tbd-text); font-family: inherit; }
body.tbd-v3 .tbd-footer__col ul { list-style: none; margin: 0; padding: 0; }
body.tbd-v3 .tbd-footer__col li { margin-bottom: 8px; }
body.tbd-v3 .tbd-footer__col a { color: var(--tbd-muted); text-decoration: none; font-size: 14px; }
body.tbd-v3 .tbd-footer__col a:hover { color: var(--tbd-accent-dark); }
body.tbd-v3 .tbd-footer__social-links { display: flex; gap: 8px; }
body.tbd-v3 .tbd-footer__social-links a { width: 34px; height: 34px; border: 1px solid var(--tbd-line); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--tbd-text); text-decoration: none; font-size: 13px; font-weight: 700; }
body.tbd-v3 .tbd-footer__social-links a:hover { border-color: var(--tbd-accent); color: var(--tbd-accent-dark); }
body.tbd-v3 .tbd-footer__bottom { border-top: 1px solid var(--tbd-line); padding: 16px 0; }
body.tbd-v3 .tbd-footer__copy { color: var(--tbd-muted); font-size: 13px; }

/* --------- Suprimir o rodape duplicado do snippet (apenas no tema novo) --------- */
body.tbd-v3 .tbd-footer--editorial { display: block !important; }
body.tbd-v3 .tdb-portal-footer { display: none !important; }
body.tbd-v3 .tbd-newsletter { display: none !important; }

/* --------- Responsivo --------- */
@media (max-width: 960px) {
    body.tbd-v3 .tbd-topbar__nav, body.tbd-v3 .tbd-topbar__meta .tbd-live-clock { display: none; }
    body.tbd-v3 .tbd-editorias__grid { grid-template-columns: repeat(2, 1fr); }
    body.tbd-v3 .tbd-footer--editorial .tbd-footer__inner { grid-template-columns: 1fr 1fr; }
    body.tbd-v3 .tbd-editorias + .tbd-editorias .tbd-editoria { grid-template-columns: 1fr; }

    /* Menu vira acordeao mobile */
    body.tbd-v3 .tbd-nav__list { flex-direction: column; gap: 0; }
    body.tbd-v3 .tbd-nav .menu-item { border-bottom: 1px solid var(--tbd-line); }
    body.tbd-v3 .tbd-nav .menu-item > a { padding: 14px 4px; }
    body.tbd-v3 .tbd-nav .menu-item-has-children > a::after { display: none; }
    body.tbd-v3 .tbd-subnav-toggle { display: inline-flex; position: absolute; right: 0; top: 6px; width: 40px; height: 40px; background: transparent; border: none; cursor: pointer; align-items: center; justify-content: center; }
    body.tbd-v3 .tbd-subnav-toggle span { width: 10px; height: 10px; border-right: 2px solid var(--tbd-text); border-bottom: 2px solid var(--tbd-text); transform: rotate(45deg); transition: transform .18s ease; }
    body.tbd-v3 .tbd-nav .menu-item-has-children.is-open > .tbd-subnav-toggle span { transform: rotate(-135deg); }
    body.tbd-v3 .tbd-nav .sub-menu { position: static; opacity: 1; visibility: hidden; transform: none; box-shadow: none; border: none; border-radius: 0; max-height: 0; overflow: hidden; padding: 0 0 0 12px; transition: max-height .2s ease; }
    body.tbd-v3 .tbd-nav .menu-item-has-children.is-open > .sub-menu { visibility: visible; max-height: 600px; padding-bottom: 8px; }
}
@media (max-width: 620px) {
    body.tbd-v3 .tbd-editorias__grid { grid-template-columns: 1fr; }
    body.tbd-v3 .tbd-footer--editorial .tbd-footer__inner { grid-template-columns: 1fr; }
}

/* --------- Reprodutor de audio (Ouca esta materia) --------- */
body.tbd-v3 .tbd-audio-player {
    display: flex; align-items: center; flex-wrap: wrap; gap: 14px 18px;
    padding: 14px 18px; margin: 0 0 26px;
    background: var(--tbd-surface-2); border: 1px solid var(--tbd-line);
    border-radius: 12px;
}
body.tbd-v3 .tbd-audio-player .audio-play {
    flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%;
    border: none; cursor: pointer; background: var(--tbd-accent); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .18s ease, transform .12s ease;
}
body.tbd-v3 .tbd-audio-player .audio-play:hover { background: var(--tbd-accent-dark); }
body.tbd-v3 .tbd-audio-player .audio-play:active { transform: scale(.95); }
body.tbd-v3 .tbd-audio-player .audio-play .icon { width: 22px; height: 22px; fill: currentColor; }
body.tbd-v3 .tbd-audio-player .audio-info { display: flex; flex-direction: column; line-height: 1.3; margin-right: auto; }
body.tbd-v3 .tbd-audio-player .audio-label { font-family: var(--tbd-serif); font-size: 17px; font-weight: 600; color: var(--tbd-text); }
body.tbd-v3 .tbd-audio-player .audio-status { font-size: 12px; color: var(--tbd-muted); }
body.tbd-v3 .tbd-audio-player .audio-speeds { display: inline-flex; gap: 4px; }
body.tbd-v3 .tbd-audio-player .audio-speeds button {
    border: 1px solid var(--tbd-line); background: var(--tbd-surface); color: var(--tbd-muted);
    border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 600; cursor: pointer;
    transition: all .15s ease;
}
body.tbd-v3 .tbd-audio-player .audio-speeds button:hover { border-color: var(--tbd-accent); color: var(--tbd-text); }
body.tbd-v3 .tbd-audio-player .audio-speeds button.is-active { background: var(--tbd-accent); border-color: var(--tbd-accent); color: #fff; }
body.tbd-v3 .tbd-audio-player .audio-timeline { display: flex; align-items: center; gap: 10px; flex: 1 1 260px; min-width: 220px; }
body.tbd-v3 .tbd-audio-player .audio-time { font-size: 12px; color: var(--tbd-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
body.tbd-v3 .tbd-audio-player .audio-track { position: relative; flex: 1; height: 6px; background: var(--tbd-line); border-radius: 999px; cursor: pointer; }
body.tbd-v3 .tbd-audio-player .audio-track-fill { position: absolute; left: 0; top: 0; height: 100%; background: var(--tbd-accent); border-radius: 999px; }
body.tbd-v3 .tbd-audio-player .audio-track-thumb { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: var(--tbd-accent-dark); transform: translate(-50%, -50%); box-shadow: 0 1px 4px rgba(0,0,0,.2); }
body.tbd-v3 .tbd-audio-player .audio-track:focus-visible { outline: 2px solid var(--tbd-accent); outline-offset: 3px; }
@media (max-width: 620px) {
    body.tbd-v3 .tbd-audio-player { gap: 12px; }
    body.tbd-v3 .tbd-audio-player .audio-timeline { flex-basis: 100%; order: 3; }
}

/* --------- Correcoes home (2026-07-23) --------- */
/* Alinha os blocos de editorias mesmo com titulos de 1 ou 2 linhas */
body.tbd-v3 .tbd-editorias__grid { align-items: start; }
body.tbd-v3 .tbd-editoria__head { min-height: 50px; align-items: flex-start; }
body.tbd-v3 .tbd-editoria__title { font-size: 18px; line-height: 1.14; }
/* Evita quebra de palavra no meio (ex.: antienvelhecimento) */
body.tbd-v3 .tbd-hero-card h1 { font-size: clamp(30px, 4.2vw, 46px); line-height: 1.08; }
body.tbd-v3 h1, body.tbd-v3 h2, body.tbd-v3 h3,
body.tbd-v3 .tbd-hero-card h1, body.tbd-v3 .tbd-overlay-card h2, body.tbd-v3 .tbd-editoria__title {
    hyphens: manual; -webkit-hyphens: manual; overflow-wrap: break-word; word-break: normal;
}
/* Bloco Bem-estar: garante grid coerente e sem colunas quebradas em telas medias */
@media (max-width: 1100px) {
    body.tbd-v3 .tbd-editorias + .tbd-editorias .tbd-editoria { grid-template-columns: 260px 1fr; }
}

/* Dropdown dos ultimos itens abre alinhado a direita (evita overflow horizontal) */
@media (min-width: 961px) {
    body.tbd-v3 .tbd-nav__list > .menu-item:nth-last-child(-n+2) > .sub-menu { left: auto; right: 0; }
}
/* Rede de seguranca contra qualquer rolagem lateral */
body.tbd-v3 { overflow-x: hidden; }

/* --------- Home: destaque cresce com o conteudo (sem cortar titulo) --------- */
body.tbd-v3 .tbd-featured-grid { height: auto; min-height: 440px; align-items: stretch; }
body.tbd-v3 .tbd-home-layout__main { height: auto; }
body.tbd-v3 .tbd-home-layout__side { height: auto; grid-template-rows: 1fr 1fr; }
body.tbd-v3 .tbd-hero-card { height: auto; min-height: 440px; }
body.tbd-v3 .tbd-overlay-card { height: auto; min-height: 210px; }

html { overflow-x: hidden; }
