/* Blog da HIVE. Direção editorial clara, com o roxo HIVE nos detalhes. Usa os tokens do /assets/css/style.css do site. */

/* Header sempre sólido: o topo do blog é claro */
.site-header::before { opacity: 1 !important; }

.tag { font-size: .8125rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--lavender); }
.meta { font-size: .9375rem; color: var(--text-muted); }
.meta span[aria-hidden] { margin-inline: 6px; opacity: .5; }

/* ---------- Lista ---------- */
.b-top { padding-top: calc(var(--header-h) + clamp(56px, 8vw, 128px)); padding-bottom: clamp(40px, 5vw, 64px); }
.b-top__row { display: grid; grid-template-columns: 1fr minmax(0, 30ch); align-items: end; gap: clamp(24px, 5vw, 96px); }
.b-top__title { margin-top: 20px; font-family: var(--font-display); font-size: clamp(3rem, 1.4rem + 6.4vw, 8.5rem); font-weight: 600; line-height: .92; letter-spacing: -.055em; color: var(--plum); }
.b-top__title em { font-style: normal; color: var(--lavender); }
.b-top__lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--text-muted); }
.b-cats { display: flex; flex-wrap: wrap; gap: clamp(16px, 2.4vw, 36px); margin-top: clamp(48px, 6vw, 88px); padding-top: 20px; border-top: 1px solid var(--line); }
.b-cats a { position: relative; padding-bottom: 6px; font-size: 1rem; color: var(--text-muted); transition: color var(--dur-fast); }
.b-cats a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--plum); transform: scaleX(0); transform-origin: left; transition: transform var(--dur) var(--ease-out); }
.b-cats a:hover, .b-cats a[aria-current] { color: var(--plum); }
.b-cats a:hover::after, .b-cats a[aria-current]::after { transform: scaleX(1); }
.b-cats sup { margin-left: 4px; font-size: .7em; opacity: .6; }

.b-feature { display: grid; grid-template-columns: 1.45fr 1fr; gap: clamp(28px, 4vw, 72px); align-items: end; }
.b-feature__media, .b-card__media { overflow: hidden; border-radius: var(--radius); background: var(--paper-2); }
.b-feature__media { aspect-ratio: 4/3; border-radius: var(--radius-lg); }
.b-feature__media img, .b-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-out); }
.b-feature:hover img, .b-card:hover img { transform: scale(1.04); }
.b-feature__title { margin: 18px 0 22px; font-family: var(--font-display); font-size: clamp(1.875rem, 1.1rem + 2.6vw, 3.5rem); font-weight: 600; line-height: 1.04; letter-spacing: -.04em; color: var(--ink); text-wrap: balance; }
.b-feature__excerpt { max-width: 44ch; margin-bottom: 28px; font-size: var(--fs-lead); line-height: 1.5; color: var(--text-muted); }
.b-read { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; color: var(--plum); }
.b-read i { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--plum); color: var(--white); transition: transform var(--dur) var(--ease-out); }
.b-read svg { width: 18px; height: 18px; }
.b-feature:hover .b-read i, .b-card:hover .b-read i { transform: rotate(-45deg); }

.b-sectionhead { display: flex; justify-content: space-between; align-items: baseline; margin: clamp(88px, 10vw, 152px) 0 clamp(28px, 3vw, 44px); padding-top: 20px; border-top: 1px solid var(--line); }
.b-sectionhead h2 { font-family: var(--font-display); font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 600; letter-spacing: -.03em; }
.b-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(40px, 5vw, 72px) clamp(20px, 2.4vw, 36px); }
.b-card { display: flex; flex-direction: column; }
.b-card__media { aspect-ratio: 3/2; margin-bottom: 22px; }
.b-card__title { margin: 12px 0 14px; font-family: var(--font-display); font-size: clamp(1.1875rem, 1rem + .5vw, 1.5rem); font-weight: 600; line-height: 1.22; letter-spacing: -.025em; text-wrap: pretty; transition: color var(--dur-fast); }
.b-card:hover .b-card__title { color: var(--plum); }
.b-more { display: flex; justify-content: center; margin-top: clamp(64px, 7vw, 104px); }
.b-more a { padding: 16px 32px; border: 1px solid var(--plum); border-radius: 999px; font-weight: 600; color: var(--plum); transition: background var(--dur-fast), color var(--dur-fast); }
.b-more a:hover { background: var(--plum); color: var(--white); }

@media (max-width: 900px) {
  .b-top__row, .b-feature { grid-template-columns: 1fr; }
  .b-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) { .b-grid { grid-template-columns: 1fr; } }

/* ---------- Post ---------- */
.p-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 200; height: 3px; background: var(--lavender); transform: scaleX(0); transform-origin: left; }
.p-top { padding-top: calc(var(--header-h) + clamp(48px, 7vw, 112px)); text-align: center; }
.p-top .container { max-width: 1040px; }
.p-back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: clamp(32px, 4vw, 48px); font-size: .9375rem; color: var(--text-muted); }
.p-back svg { width: 16px; height: 16px; }
.p-back:hover { color: var(--plum); }
.p-title { margin: 20px auto 0; max-width: 22ch; font-family: var(--font-display); font-size: clamp(2.25rem, 1.2rem + 3.8vw, 4.75rem); font-weight: 600; line-height: 1.02; letter-spacing: -.045em; color: var(--ink); text-wrap: balance; }
.p-lead { max-width: 56ch; margin: clamp(24px, 3vw, 36px) auto 0; font-size: var(--fs-lead); line-height: 1.55; color: var(--text-muted); }
.p-author { display: inline-flex; align-items: center; gap: 14px; margin-top: clamp(32px, 4vw, 44px); text-align: left; }
.p-author__avatar { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--plum); color: var(--white); font-family: var(--font-display); font-weight: 600; }
.p-author strong { display: block; font-weight: 600; color: var(--ink); }
.p-cover { max-width: 1280px; margin: clamp(56px, 7vw, 104px) auto 0; padding-inline: var(--gutter); }
.p-cover img { width: 100%; aspect-ratio: 21/10; object-fit: cover; border-radius: var(--radius-lg); }
.p-cover figcaption { margin-top: 14px; font-size: .875rem; color: var(--text-muted); text-align: center; }

.p-layout { display: grid; grid-template-columns: 1fr minmax(0, 66ch) 1fr; column-gap: clamp(24px, 4vw, 64px); padding-block: clamp(64px, 8vw, 120px) clamp(80px, 9vw, 140px); }
.p-share { grid-column: 1; justify-self: end; align-self: start; position: sticky; top: calc(var(--header-h) + 32px); display: flex; flex-direction: column; gap: 10px; }
.p-share a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); color: var(--plum); transition: background var(--dur-fast), color var(--dur-fast); }
.p-share a:hover { background: var(--plum); color: var(--white); }
.p-share svg { width: 18px; height: 18px; }
.p-body { grid-column: 2; font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); line-height: 1.75; color: #3A2E44; }
.p-body > * + * { margin-top: 1.25em; }
.p-body > p:first-child::first-letter { float: left; margin: .08em .12em 0 0; font-family: var(--font-display); font-size: 3.6em; font-weight: 600; line-height: .8; color: var(--plum); }
.p-body h2 { margin-top: 2.2em; font-family: var(--font-display); font-size: clamp(1.5rem, 1.15rem + 1.1vw, 2.125rem); font-weight: 600; line-height: 1.18; letter-spacing: -.03em; color: var(--ink); }
.p-body h2 span { color: var(--lavender); }
.p-body a { color: var(--plum); text-decoration: underline; text-decoration-color: var(--lavender); text-underline-offset: 4px; }
.p-body blockquote { margin: 2em 0; padding: 0; font-family: var(--font-display); font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem); font-weight: 500; line-height: 1.2; letter-spacing: -.03em; color: var(--plum); }
.p-body blockquote::before { content: "“"; display: block; height: .5em; font-size: 2.4em; line-height: 1; color: var(--lavender); }
.p-body ul { padding: 0; list-style: none; }
.p-body li { position: relative; padding-left: 28px; } .p-body li + li { margin-top: .6em; }
.p-body li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 10px; height: 2px; background: var(--lavender); }
.p-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 3em !important; padding-top: 28px; border-top: 1px solid var(--line); }
.p-tags a { padding: 8px 14px; border-radius: 999px; background: var(--paper-2); font-size: .875rem; color: var(--plum); text-decoration: none; }
.p-authorbox { display: flex; gap: 20px; align-items: center; margin-top: 2em !important; padding: 28px; border-radius: var(--radius); background: var(--white); box-shadow: 0 0 0 1px var(--line); }
.p-authorbox .p-author__avatar { width: 64px; height: 64px; flex: none; font-size: 1.25rem; }
.p-authorbox strong { display: block; font-family: var(--font-display); font-weight: 600; color: var(--ink); }
.p-authorbox p { margin: 4px 0 0; font-size: .9375rem; line-height: 1.5; color: var(--text-muted); }

.p-related { padding-block: clamp(80px, 9vw, 140px); background: var(--white); }
.p-related .b-sectionhead { margin-top: 0; }

@media (max-width: 900px) {
  .p-top { text-align: left; }
  .p-title, .p-lead { margin-left: 0; }
  .p-cover img { aspect-ratio: 4/3; }
  .p-layout { grid-template-columns: 1fr; padding-inline: var(--gutter); }
  .p-body, .p-share { grid-column: 1; }
  .p-share { position: static; order: 2; flex-direction: row; justify-self: start; margin-top: 40px; }
}

/* ---------- Complementos do tema ---------- */
.b-list { padding-top: clamp(24px, 3vw, 48px); }
.b-feature__meta { margin-bottom: 28px; }
.b-feature__media:empty, .b-card__media:empty { background: linear-gradient(135deg, var(--plum), var(--lavender)); }
.tag a:hover { color: var(--plum); }
.p-back__icon { display: inline-flex; }

.b-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: clamp(64px, 7vw, 104px); }
.b-pages .page-numbers { display: grid; place-items: center; min-width: 48px; height: 48px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; color: var(--plum); transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast); }
.b-pages a.page-numbers:hover, .b-pages .current { background: var(--plum); border-color: var(--plum); color: var(--white); }
.b-pages .dots { border-color: transparent; }

.b-empty { padding-block: 40px; }
.b-empty p { margin-bottom: 24px; font-size: var(--fs-lead); color: var(--text-muted); }
.b-top--404 { min-height: 70vh; padding-bottom: var(--section); }
.b-top--404 .b-top__lead { max-width: 40ch; margin: 28px 0 36px; }

.p-author__photo { width: 64px; height: 64px; flex: none; border-radius: 50%; object-fit: cover; }

/* Conteúdo vindo do editor do WordPress */
.p-body > * + * { margin-top: 1.25em; }
.p-body--plain > p:first-child::first-letter { all: unset; }
.p-body h3 { margin-top: 1.8em; font-family: var(--font-display); font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem); font-weight: 600; line-height: 1.25; letter-spacing: -.02em; color: var(--ink); }
.p-body strong { font-weight: 700; color: var(--ink); }
.p-body ol { padding-left: 1.4em; } .p-body ol li { padding-left: 4px; } .p-body ol li::before { content: none; }
.p-body ol li::marker { font-family: var(--font-display); font-weight: 600; color: var(--lavender); }
.p-body figure, .p-body .wp-block-image { margin: 2.2em 0; }
.p-body img { max-width: 100%; height: auto; border-radius: var(--radius); }
.p-body figcaption, .p-body .wp-element-caption { margin-top: 12px; font-size: .875rem; line-height: 1.5; color: var(--text-muted); text-align: center; }
.p-body .alignwide { margin-inline: clamp(-120px, -8vw, 0px); }
.p-body .alignfull { margin-inline: calc(50% - 50vw); width: 100vw; max-width: 100vw; }
.p-body .alignfull img { border-radius: 0; }
.p-body iframe, .p-body .wp-block-embed__wrapper > * { width: 100%; border-radius: var(--radius); }
.p-body .wp-block-embed.is-type-video iframe { aspect-ratio: 16/9; height: auto; }
.p-body table { width: 100%; border-collapse: collapse; font-size: .9375em; }
.p-body th, .p-body td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.p-body th { font-weight: 700; color: var(--ink); }
.p-body hr { margin-block: 3em; border: 0; border-top: 1px solid var(--line); }
.p-body .wp-block-button__link { display: inline-flex; padding: 16px 28px; border-radius: 999px; background: var(--plum); color: var(--white); font-weight: 600; text-decoration: none; }
.p-body .wp-block-pullquote { padding: 0; border: 0; text-align: left; }
@media (max-width: 900px) { .p-body .alignwide { margin-inline: 0; } }
