/* =======================
   BLOG POST — ITA DIGITAL
   ======================= */

/* Hero do post */
.post-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-block: clamp(44px, 6vw, 80px);
    background:
      radial-gradient(1000px 380px at 10% -10%, #f4f8ff 0%, transparent 60%),
      radial-gradient(900px 360px at 100% 0%, #f7fbff 0%, transparent 70%),
      linear-gradient(180deg, #fff 0%, #fff 100%);
  }
  .post-hero .ph-wrap { padding-inline: clamp(12px, 3vw, 24px); }
  .post-hero .meta {
    display: inline-flex; align-items: center; gap: 8px; color: #64748b; margin-bottom: 6px;
  }
  .post-hero .meta .dot { opacity: .6; }
  .post-hero .title {
    margin: 0 0 6px; line-height: 1.08;
    font-size: clamp(1.8rem, 3.6vw, 2.4rem);
  }
  .post-hero .excerpt { margin: 0; color: #334155; }
  
  /* Página */
  .post-page { padding-block: clamp(20px, 4vw, 40px); }
  .post-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px; /* artigo + sidebar à direita */
    gap: clamp(16px, 2.5vw, 24px);
    align-items: start;
    padding-inline: clamp(12px, 3vw, 24px);
  }
  
  /* Artigo */
  .post {
    padding: clamp(16px, 2.5vw, 22px);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255,255,255,0.75);
    border: 1px solid rgba(148,163,184,0.25);
    backdrop-filter: blur(8px);
  }
  .post .cover {
    margin: -16px -16px 14px;
    border-bottom: 1px solid rgba(148,163,184,.18);
    background: #f8fafc;
  }
  .post .cover img { display: block; width: 100%; height: auto; }
  
  .post .content {
    font-size: clamp(1rem, 1.15vw, 1.05rem);
    color: #0f172a;
    line-height: 1.75;
  }
  .post .content h2 { font-size: 1.45em; margin: 1.6em 0 .6em; line-height: 1.25; }
  .post .content h3 { font-size: 1.2em; margin: 1.2em 0 .5em; line-height: 1.3; }
  .post .content p { margin: .85em 0; }
  .post .content ul, .post .content ol { padding-left: 1.2em; margin: .8em 0; }
  .post .content blockquote {
    margin: 1.1em 0; padding: .9em 1em; border-left: 4px solid #3aa0ff;
    background: #f1f8ff; color: #0b1a31; border-radius: 8px;
  }
  .post .content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: .95em; background: #f6f8fa; padding: .15em .35em; border-radius: 6px;
  }
  .post .content pre {
    background: #0a0f1d; color: #e8edf7; padding: 14px; border-radius: 10px;
    overflow: auto; border: 1px solid rgba(148,163,184,.25);
  }
  .post .content img { display: block; max-width: 100%; height: auto; border-radius: 10px; }
  
  /* Sidebar fixa ao lado (widgets empilhados) */
  .sidebar { position: sticky; top: 96px; align-self: start; }
  .sidebar-grid {
    display: grid;
    grid-template-columns: 1fr;   /* sempre uma coluna: newsletter em cima, últimos artigos embaixo */
    gap: 16px;
  }
  
  .widget {
    padding: clamp(14px, 2.2vw, 18px);
    border-radius: 14px;
    background: rgba(255,255,255,0.75);
    border: 1px solid rgba(148,163,184,0.25);
    backdrop-filter: blur(8px);
  }
  .w-title { margin: 0 0 6px; font-size: 1.05rem; }
  .w-sub { margin: 0 0 10px; color: #475569; font-size: .95rem; }
  
  /* Newsletter */
  .newsletter .nl-form { display: grid; gap: 8px; }
  .newsletter .field input {
    width: 100%;
    border: 1px solid rgba(148,163,184,.35);
    background: rgba(255,255,255,.85);
    border-radius: 10px;
    padding: 10px 12px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
    font: inherit;
  }
  .newsletter .field input:focus {
    border-color: rgba(59,130,246,.6);
    box-shadow: 0 0 0 4px rgba(59,130,246,.15);
    background: #fff;
  }
  .newsletter .btn { margin-top: 2px; width: 100%; } /* largura total para alinhar */
  .newsletter .mini { color: #64748b; margin: 8px 0 0; font-size: .85rem; }
  .hp { position: absolute !important; left: -9999px !important; top: -9999px !important; }
  
  /* Alerts */
  .alert {
    border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; font-weight: 600;
  }
  .alert.success { background: #e9fce9; color: #145b14; border: 1px solid #bce8bd; }
  .alert.error   { background: #ffecec; color: #7a1717; border: 1px solid #ffcccc; }
  
  /* Últimos artigos (somente títulos) */
  .w-latest .latest-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
  .w-latest .latest-link {
    display: inline-block;
    text-decoration: none;
    color: #0f172a;
    border-bottom: 1px dashed rgba(148,163,184,.5);
    padding-bottom: 2px;
    line-height: 1.35;
  }
  .w-latest .latest-link:hover { color: #0b63f3; border-color: rgba(11,99,243,.6); }
  
  /* Footer leve */
  .footer-lite .container { display: grid; gap: 10px; padding: 18px; }
  .footer-lite .brand-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
  .footer-lite .logo { height: 28px; }
  .footer-lite .muted { color: #64748b; }
  .footer-lite .links { display: flex; gap: 12px; flex-wrap: wrap; }
  
  /* Responsivo */
  @media (max-width: 1100px) {
    .post-grid { grid-template-columns: 1fr; }
    .sidebar { position: static; top: auto; }
  }
  
  /* Dark mode */
  .theme-dark .post-hero {
    background:
      radial-gradient(900px 360px at 10% -10%, #0e1b2f 0%, transparent 60%),
      radial-gradient(800px 340px at 100% 0%, #0b2342 0%, transparent 70%),
      linear-gradient(180deg, #0a0f1d 0%, #0b1222 100%);
    color: #e8edf7;
  }
  .theme-dark .post-hero .excerpt { color: #cbd5e1; }
  .theme-dark .post,
  .theme-dark .widget {
    background: rgba(15, 23, 42, 0.5);
    border-color: rgba(148,163,184,0.22);
  }
  .theme-dark .post .content { color: #e2e8f0; }
  .theme-dark .newsletter .field input {
    background: rgba(15,23,42,.6); color: #e2e8f0; border-color: rgba(148,163,184,.25);
  }
  .theme-dark .w-latest .latest-link { color: #e2e8f0; border-bottom-color: rgba(148,163,184,.4); }
  /* --- FIX: sidebar sempre empilhada (override) --- */
.post-page .sidebar .sidebar-grid{
    display:grid;
    grid-template-columns: 1fr !important; /* força uma coluna */
    gap: 16px !important;
  }
  