/*
Theme Name: IIe English
Theme URI: https://iie.com.br
Author: IIe English
Author URI: https://iie.com.br
Description: Tema oficial do IIe English LMS — compatível com o plugin iie-english-lms. Herda o mesmo design system: tokens, tipografia, paleta e modo escuro automático.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
Text Domain: iie-english
Tags: education, lms, dark-mode, custom-colors
*/

/* ════════════════════════════════════════════════════════════════
   IIe English Theme — Design System
   Mesmos tokens do plugin iie-english-lms para coerência visual
   ════════════════════════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
img, video { max-width: 100%; display: block; }
a { text-decoration: none; }

/* ── Design Tokens ── */
:root {
  /* Paleta light (padrão) */
  --bg:       #F0EEE9;
  --bg2:      #E8E5DF;
  --bg3:      #D8D5CF;
  --surface:  #FAFAF7;
  --surface2: #F2F0EB;
  --surface3: #E8E5DF;
  --border:   rgba(0,0,0,.08);
  --border2:  rgba(0,0,0,.05);
  --text:     #0D0D0B;
  --text2:    rgba(30,30,35,.72);
  --muted:    rgba(30,30,35,.52);

  /* Cores de acento */
  --red:    #C41230;
  --red2:   #A00E28;
  --green:  #22C55E;
  --amber:  #F59E0B;
  --blue:   #3B82F6;
  --purple: #A855F7;

  /* Tipografia */
  --font: 'Plus Jakarta Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;

  /* Font sizes */
  --fs-label:   .60rem;
  --fs-caption: .72rem;
  --fs-xs:      .75rem;
  --fs-sm:      .82rem;
  --fs-body:    .88rem;
  --fs-base:    .92rem;
  --fs-md:      1rem;
  --fs-lg:      1.15rem;
  --fs-xl:      1.35rem;
  --fs-title:   1.40rem;
  --fs-2xl:     1.65rem;
  --fs-display: 2.00rem;
  --fs-hero:    2.40rem;
  --fs-giant:   3.00rem;

  /* Font weights */
  --fw-normal:    400;
  --fw-medium:    500;
  --fw-semibold:  600;
  --fw-bold:      700;
  --fw-extrabold: 800;

  /* Border radius */
  --r-xs:  6px;
  --r-sm:  10px;
  --r-md:  14px;
  --r-lg:  18px;
  --r-xl:  24px;
  --pill:  999px;

  /* Shadows */
  --s1: 0 1px 6px rgba(0,0,0,.05), 0 2px 10px rgba(0,0,0,.04);
  --s2: 0 2px 12px rgba(0,0,0,.06), 0 8px 28px rgba(0,0,0,.05);
  --s3: 0 4px 20px rgba(0,0,0,.08), 0 16px 48px rgba(0,0,0,.06);

  /* Glow */
  --glow:    0 4px 14px rgba(196,18,48,.4);
  --glow-sm: 0 2px 8px rgba(196,18,48,.2);

  /* Spacing */
  --sp-2xs: 2px;  --sp-xs: 4px;  --sp-sm: 8px;  --sp-md: 12px;
  --sp-lg: 16px;  --sp-xl: 24px; --sp-2xl: 32px; --sp-3xl: 48px; --sp-4xl: 64px;

  /* Layout */
  --header-h:   70px;
  --content-w:  1200px;
  --sidebar-w:  300px;
  --touch-min:  44px;

  /* Transitions */
  --ease-out:    cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.4, 0, .2, 1);
  --dur-fast:    .12s;
  --dur-normal:  .2s;
  --dur-slow:    .35s;

  /* Z-index */
  --z-base:     1;
  --z-sticky:   200;
  --z-modal:    400;
  --z-popover:  500;
  --z-toast:    600;
  --z-skip:     999;
}

/* ── Dark mode automático ── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:       #111113;
    --bg2:      #18181B;
    --bg3:      #27272A;
    --surface:  #1C1C1E;
    --surface2: #27272A;
    --surface3: #3F3F46;
    --border:   rgba(255,255,255,.08);
    --border2:  rgba(255,255,255,.06);
    --text:     rgba(255,255,255,.95);
    --text2:    rgba(255,255,255,.65);
    --muted:    rgba(255,255,255,.50);
    --s1: 0 1px 6px rgba(0,0,0,.3),  0 2px 10px rgba(0,0,0,.2);
    --s2: 0 2px 12px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.3);
    --s3: 0 4px 20px rgba(0,0,0,.45),0 16px 48px rgba(0,0,0,.35);
  }
}

[data-theme="dark"] {
  --bg: #111113; --bg2: #18181B; --bg3: #27272A;
  --surface: #1C1C1E; --surface2: #27272A; --surface3: #3F3F46;
  --border: rgba(255,255,255,.08); --border2: rgba(255,255,255,.06);
  --text: rgba(255,255,255,.95); --text2: rgba(255,255,255,.65); --muted: rgba(255,255,255,.50);
  --s1: 0 1px 6px rgba(0,0,0,.3),  0 2px 10px rgba(0,0,0,.2);
  --s2: 0 2px 12px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.3);
  --s3: 0 4px 20px rgba(0,0,0,.45),0 16px 48px rgba(0,0,0,.35);
}

[data-theme="light"] {
  --bg: #F0EEE9; --bg2: #E8E5DF; --bg3: #D8D5CF;
  --surface: #FAFAF7; --surface2: #F2F0EB; --surface3: #E8E5DF;
  --border: rgba(0,0,0,.08); --border2: rgba(0,0,0,.05);
  --text: #0D0D0B; --text2: rgba(30,30,35,.72); --muted: rgba(30,30,35,.52);
}

/* ══════════════════════════════════════════════════════════════════
   BASE
   ══════════════════════════════════════════════════════════════════ */

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Acessibilidade ── */
*:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
*:focus:not(:focus-visible) { outline: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ══════════════════════════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════════════════════════ */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  height: var(--header-h);
  background: rgba(240,238,233,.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-header {
    background: rgba(17,17,19,.88);
  }
}
[data-theme="dark"]  .site-header { background: rgba(17,17,19,.88); }
[data-theme="light"] .site-header { background: rgba(240,238,233,.88); }

.header-inner {
  width: 100%;
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 var(--sp-xl);
  display: flex;
  align-items: center;
  gap: var(--sp-xl);
}

/* Logo */
.site-branding {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  flex-shrink: 0;
}

.site-branding a {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  color: var(--text);
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--red);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-lg);
  box-shadow: var(--glow-sm);
  flex-shrink: 0;
}

.site-name {
  font-size: var(--fs-md);
  font-weight: var(--fw-extrabold);
  letter-spacing: -.03em;
  color: var(--text);
  white-space: nowrap;
}

.site-name span {
  color: var(--red);
}

/* Navegação principal */
.main-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
}

.main-nav a {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  padding: 7px 14px;
  border-radius: var(--pill);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text2);
  transition: background var(--dur-fast), color var(--dur-fast);
}

.main-nav a:hover,
.main-nav .current-menu-item a,
.main-nav .current-page-ancestor a {
  background: var(--surface2);
  color: var(--text);
}

.main-nav .current-menu-item a {
  color: var(--red);
  background: rgba(196,18,48,.08);
}

/* Ações do header */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  flex-shrink: 0;
}

/* Botão dark mode */
.btn-dark-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: var(--fs-md);
  transition: background var(--dur-fast), color var(--dur-fast);
}

.btn-dark-toggle:hover { background: var(--surface2); color: var(--text); }

/* CTA header */
.btn-header-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  padding: 8px 18px;
  border-radius: var(--pill);
  background: var(--red);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: var(--fw-extrabold);
  letter-spacing: .02em;
  transition: all var(--dur-fast);
  box-shadow: var(--glow-sm);
  white-space: nowrap;
}

.btn-header-cta:hover {
  background: var(--red2);
  transform: translateY(-1px);
  box-shadow: var(--glow);
}

/* Mobile hamburger */
.btn-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--r-sm);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
}

.btn-menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text2);
  border-radius: 2px;
  transition: all var(--dur-normal);
}

@media (max-width: 900px) {
  .main-nav { display: none; }
  .btn-menu-toggle { display: flex; }

  .main-nav.open {
    display: flex;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    padding: var(--sp-xl);
    flex-direction: column;
    justify-content: flex-start;
    z-index: var(--z-modal);
    overflow-y: auto;
  }

  .main-nav.open ul {
    flex-direction: column;
    width: 100%;
    gap: var(--sp-xs);
  }

  .main-nav.open a {
    padding: var(--sp-md) var(--sp-lg);
    font-size: var(--fs-md);
    width: 100%;
    border-radius: var(--r-md);
  }
}

/* ══════════════════════════════════════════════════════════════════
   LAYOUT
   ══════════════════════════════════════════════════════════════════ */

.site-main {
  min-height: calc(100vh - var(--header-h) - 280px);
}

.container {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 var(--sp-xl);
}

@media (max-width: 600px) {
  .container { padding: 0 var(--sp-lg); }
}

/* Layout com sidebar */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: var(--sp-2xl);
  padding: var(--sp-3xl) 0;
  align-items: start;
}

@media (max-width: 1024px) {
  .content-with-sidebar {
    grid-template-columns: 1fr;
  }
  .site-sidebar { order: -1; }
}

/* Página sem sidebar */
.content-full {
  padding: var(--sp-3xl) 0;
}

/* ══════════════════════════════════════════════════════════════════
   HERO SECTION
   ══════════════════════════════════════════════════════════════════ */

.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-4xl) 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), transparent 70%);
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-3xl);
}

@media (max-width: 768px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
    gap: var(--sp-2xl);
  }
}

.hero-content { flex: 1; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  font-family: var(--mono);
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: var(--sp-lg);
}

.hero-eyebrow::before {
  content: '';
  width: 16px;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
}

.hero-title {
  font-size: var(--fs-hero);
  font-weight: var(--fw-extrabold);
  letter-spacing: -.05em;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: var(--sp-lg);
}

@media (min-width: 640px) {
  .hero-title { font-size: var(--fs-giant); }
}

.hero-title em {
  color: var(--red);
  font-style: normal;
}

.hero-sub {
  font-size: var(--fs-lg);
  color: var(--text2);
  line-height: 1.65;
  margin-bottom: var(--sp-2xl);
  max-width: 560px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-md);
}

@media (max-width: 768px) {
  .hero-actions { justify-content: center; }
}

/* ══════════════════════════════════════════════════════════════════
   TIPOGRAFIA
   ══════════════════════════════════════════════════════════════════ */

.entry-title,
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--fw-extrabold);
  letter-spacing: -.03em;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: var(--fs-hero); margin-bottom: var(--sp-xl); }
h2 { font-size: var(--fs-display); margin-bottom: var(--sp-lg); }
h3 { font-size: var(--fs-title); margin-bottom: var(--sp-md); }
h4 { font-size: var(--fs-lg); margin-bottom: var(--sp-md); }
h5 { font-size: var(--fs-md); margin-bottom: var(--sp-sm); }
h6 { font-size: var(--fs-base); margin-bottom: var(--sp-sm); }

p { color: var(--text2); line-height: 1.7; margin-bottom: var(--sp-lg); }
p:last-child { margin-bottom: 0; }

a { color: var(--red); transition: color var(--dur-fast); }
a:hover { color: var(--red2); }

strong, b { font-weight: var(--fw-bold); color: var(--text); }
em { font-style: italic; }

code, kbd, samp {
  font-family: var(--mono);
  font-size: .9em;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  padding: 2px 6px;
  color: var(--red);
}

pre {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-xl);
  overflow-x: auto;
  margin-bottom: var(--sp-xl);
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: var(--fs-sm);
  color: var(--text);
}

blockquote {
  border-left: 3px solid var(--red);
  padding: var(--sp-md) var(--sp-xl);
  margin: var(--sp-xl) 0;
  background: rgba(196,18,48,.04);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}

blockquote p { color: var(--text); font-size: var(--fs-lg); font-style: italic; }
blockquote cite { font-size: var(--fs-sm); color: var(--muted); font-style: normal; }

ul, ol {
  padding-left: var(--sp-xl);
  margin-bottom: var(--sp-lg);
  color: var(--text2);
  line-height: 1.8;
}

li { margin-bottom: var(--sp-xs); }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--sp-2xl) 0;
}

/* Eyebrow pattern */
.eyebrow {
  font-family: var(--mono);
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-sm);
}

.eyebrow::before {
  content: '';
  width: 16px;
  height: 1px;
  background: var(--muted);
}

/* ══════════════════════════════════════════════════════════════════
   BOTÕES
   ══════════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  min-height: var(--touch-min);
  padding: 11px 22px;
  border-radius: var(--pill);
  font-family: var(--font);
  font-size: var(--fs-sm);
  font-weight: var(--fw-extrabold);
  letter-spacing: .02em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--dur-fast) var(--ease-out);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 4px 14px rgba(196,18,48,.3);
}
.btn-primary:hover {
  background: var(--red2);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(196,18,48,.4);
}

.btn-secondary {
  background: var(--surface2);
  color: var(--text2);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--bg3);
  color: var(--text);
  border-color: rgba(0,0,0,.15);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text2);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--surface2);
  color: var(--text);
  border-color: rgba(0,0,0,.15);
}

.btn-sm  { min-height: 34px; padding: 6px 14px; font-size: var(--fs-xs); }
.btn-lg  { min-height: 52px; padding: var(--sp-lg) var(--sp-2xl); font-size: var(--fs-body); }

/* ══════════════════════════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════════════════════════ */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-2xl);
  box-shadow: var(--s1);
  transition: box-shadow var(--dur-normal), transform var(--dur-normal);
  position: relative;
  overflow: hidden;
}

.card + .card { margin-top: var(--sp-lg); }

.card:hover { box-shadow: var(--s2); }

.card-clickable { cursor: pointer; }
.card-clickable:hover { transform: translateY(-2px); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-lg);
}

.card-title {
  font-size: var(--fs-md);
  font-weight: var(--fw-extrabold);
  letter-spacing: -.025em;
  color: var(--text);
}

.card-accent-top::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), transparent 60%);
}

/* ══════════════════════════════════════════════════════════════════
   FORMULÁRIOS
   ══════════════════════════════════════════════════════════════════ */

.form-group {
  margin-bottom: var(--sp-lg);
}

label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text2);
  margin-bottom: var(--sp-xs);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="number"],
input[type="tel"],
textarea,
select {
  width: 100%;
  min-height: var(--touch-min);
  padding: var(--sp-md) var(--sp-lg);
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-base);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
  outline: none;
  appearance: none;
}

textarea { min-height: 120px; resize: vertical; line-height: 1.6; }

input:focus,
textarea:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

input::placeholder,
textarea::placeholder { color: var(--muted); }

/* Submit WP */
.wp-block-button .wp-block-button__link,
input[type="submit"],
button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-min);
  padding: 11px 24px;
  border-radius: var(--pill);
  background: var(--red);
  color: #fff;
  font-family: var(--font);
  font-size: var(--fs-sm);
  font-weight: var(--fw-extrabold);
  cursor: pointer;
  border: none;
  transition: all var(--dur-fast);
  box-shadow: 0 4px 14px rgba(196,18,48,.3);
}

input[type="submit"]:hover,
button[type="submit"]:hover {
  background: var(--red2);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(196,18,48,.4);
}

/* ══════════════════════════════════════════════════════════════════
   PÁGINA DE POSTS / BLOG
   ══════════════════════════════════════════════════════════════════ */

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--sp-xl);
  margin-bottom: var(--sp-3xl);
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--s1);
  transition: box-shadow var(--dur-normal), transform var(--dur-normal);
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  box-shadow: var(--s2);
  transform: translateY(-3px);
}

.post-card-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--surface2);
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow);
}

.post-card:hover .post-card-thumb img {
  transform: scale(1.04);
}

.post-card-body {
  padding: var(--sp-xl);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.post-card-category {
  font-family: var(--mono);
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--red);
}

.post-card-title {
  font-size: var(--fs-title);
  font-weight: var(--fw-extrabold);
  letter-spacing: -.03em;
  line-height: 1.25;
  color: var(--text);
}

.post-card-title a { color: inherit; }
.post-card-title a:hover { color: var(--red); }

.post-card-excerpt {
  font-size: var(--fs-body);
  color: var(--text2);
  line-height: 1.65;
  flex: 1;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  font-size: var(--fs-xs);
  color: var(--muted);
  font-family: var(--mono);
  margin-top: var(--sp-sm);
  padding-top: var(--sp-sm);
  border-top: 1px solid var(--border);
}

/* ── Post único ── */
.single-post-header {
  padding: var(--sp-3xl) 0 var(--sp-2xl);
}

.single-post-header .post-category {
  font-family: var(--mono);
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: var(--sp-md);
}

.single-post-header .entry-title {
  font-size: var(--fs-hero);
  font-weight: var(--fw-extrabold);
  letter-spacing: -.05em;
  line-height: 1.05;
  margin-bottom: var(--sp-xl);
}

@media (min-width: 640px) {
  .single-post-header .entry-title { font-size: var(--fs-giant); }
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-md);
  font-size: var(--fs-sm);
  color: var(--muted);
}

.post-meta-author {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  font-weight: var(--fw-semibold);
  color: var(--text2);
}

.post-meta-author img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.post-featured-img {
  border-radius: var(--r-xl);
  overflow: hidden;
  margin-bottom: var(--sp-3xl);
  box-shadow: var(--s3);
}

.post-featured-img img {
  width: 100%;
  aspect-ratio: 16/7;
  object-fit: cover;
}

/* Conteúdo do post */
.entry-content {
  max-width: 720px;
  font-size: var(--fs-lg);
  line-height: 1.8;
  color: var(--text2);
}

.entry-content > * + * { margin-top: var(--sp-lg); }

.entry-content h2 {
  font-size: var(--fs-2xl);
  margin-top: var(--sp-3xl);
  margin-bottom: var(--sp-lg);
}

.entry-content h3 {
  font-size: var(--fs-xl);
  margin-top: var(--sp-2xl);
}

.entry-content img {
  border-radius: var(--r-lg);
  box-shadow: var(--s2);
  margin: var(--sp-xl) auto;
}

.entry-content a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-content ul li::marker,
.entry-content ol li::marker {
  color: var(--red);
}

/* ══════════════════════════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════════════════════════ */

.site-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xl);
}

.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-xl);
  box-shadow: var(--s1);
}

.widget-title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-extrabold);
  letter-spacing: -.01em;
  color: var(--text);
  margin-bottom: var(--sp-lg);
  padding-bottom: var(--sp-sm);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.widget ul { list-style: none; padding: 0; margin: 0; }

.widget ul li {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-sm) 0;
  border-bottom: 1px solid var(--border2);
  font-size: var(--fs-sm);
  color: var(--text2);
  margin-bottom: 0;
}

.widget ul li:last-child { border-bottom: none; }

.widget ul li a {
  color: var(--text2);
  transition: color var(--dur-fast);
}
.widget ul li a:hover { color: var(--red); }

/* Widget CTA */
.widget-cta {
  background: linear-gradient(135deg, var(--red) 0%, var(--red2) 100%);
  border: none;
  color: #fff;
  text-align: center;
}

.widget-cta .widget-title { color: #fff; border-color: rgba(255,255,255,.2); }
.widget-cta p { color: rgba(255,255,255,.85); }

.widget-cta .btn {
  background: #fff;
  color: var(--red);
  width: 100%;
  justify-content: center;
  margin-top: var(--sp-lg);
}

.widget-cta .btn:hover { background: rgba(255,255,255,.9); color: var(--red2); }

/* ══════════════════════════════════════════════════════════════════
   PAGINAÇÃO
   ══════════════════════════════════════════════════════════════════ */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-xs);
  padding: var(--sp-2xl) 0;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--sp-md);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--text2);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all var(--dur-fast);
  text-decoration: none;
}

.page-numbers:hover { background: var(--surface2); color: var(--text); }
.page-numbers.current { background: var(--red); color: #fff; border-color: transparent; }

/* ══════════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════════ */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: var(--sp-4xl);
}

.footer-top {
  padding: var(--sp-4xl) 0 var(--sp-3xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--sp-3xl);
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-2xl); }
}

@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand .site-name {
  font-size: var(--fs-lg);
  font-weight: var(--fw-extrabold);
}

.footer-tagline {
  font-size: var(--fs-body);
  color: var(--muted);
  line-height: 1.6;
  margin-top: var(--sp-sm);
  max-width: 260px;
}

.footer-col-title {
  font-family: var(--mono);
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--sp-lg);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.footer-links a {
  font-size: var(--fs-sm);
  color: var(--text2);
  transition: color var(--dur-fast);
}

.footer-links a:hover { color: var(--red); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: var(--sp-xl) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-md);
}

.footer-copy {
  font-size: var(--fs-xs);
  color: var(--muted);
  font-family: var(--mono);
}

.footer-bottom-links {
  display: flex;
  gap: var(--sp-lg);
}

.footer-bottom-links a {
  font-size: var(--fs-xs);
  color: var(--muted);
  font-family: var(--mono);
}

.footer-bottom-links a:hover { color: var(--red); }

/* ══════════════════════════════════════════════════════════════════
   BLOCOS GUTENBERG
   ══════════════════════════════════════════════════════════════════ */

.wp-block-group { margin-bottom: var(--sp-2xl); }

.wp-block-separator {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--sp-2xl) 0;
}

.wp-block-quote {
  border-left: 3px solid var(--red);
  padding: var(--sp-md) var(--sp-xl);
  margin: var(--sp-xl) 0;
  background: rgba(196,18,48,.04);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}

.wp-block-image img {
  border-radius: var(--r-lg);
}

.wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

.wp-block-table th,
.wp-block-table td {
  padding: var(--sp-md) var(--sp-lg);
  border: 1px solid var(--border);
  text-align: left;
}

.wp-block-table th {
  background: var(--surface2);
  font-weight: var(--fw-bold);
  color: var(--text);
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.wp-block-table td { color: var(--text2); }

/* ══════════════════════════════════════════════════════════════════
   UTILITÁRIOS
   ══════════════════════════════════════════════════════════════════ */

.text-red    { color: var(--red); }
.text-green  { color: var(--green); }
.text-amber  { color: var(--amber); }
.text-blue   { color: var(--blue); }
.text-muted  { color: var(--muted); }

.bg-surface  { background: var(--surface); }
.bg-surface2 { background: var(--surface2); }

.rounded-sm  { border-radius: var(--r-sm); }
.rounded-md  { border-radius: var(--r-md); }
.rounded-lg  { border-radius: var(--r-lg); }
.rounded-xl  { border-radius: var(--r-xl); }
.pill        { border-radius: var(--pill); }

.shadow-sm   { box-shadow: var(--s1); }
.shadow-md   { box-shadow: var(--s2); }
.shadow-lg   { box-shadow: var(--s3); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-sm { gap: var(--sp-sm); }
.gap-md { gap: var(--sp-md); }
.gap-lg { gap: var(--sp-lg); }

/* Animação de entrada */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.animate-in {
  animation: fade-in-up .4s cubic-bezier(.16, 1, .3, 1) both;
}
