/* Blog: the index list and the post page, both on the landing chrome */
@layer components {
  .blog_index,
  .blog_post {
    background: var(--color-bg-white);
    min-height: calc(100vh - 200px);
  }

  .blog_title {
    font-size: var(--text-2xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-base);
    color: var(--color-text);
    margin: 0 0 0.5rem 0;
    text-wrap: balance;
  }

  .blog_subtitle {
    font-size: var(--text-base);
    color: var(--color-text-light);
    line-height: var(--line-height-lg);
    margin: 0 0 2.5rem 0;
    max-width: 65ch;
  }

  .blog_list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 65ch;
  }

  .blog_card {
    padding: 1.5rem 0;
    border-top: 1px solid var(--color-border);

    &:last-child {
      border-bottom: 1px solid var(--color-border);
    }
  }

  .blog_card_title {
    font-size: var(--text-lg);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-md);
    margin: 0 0 0.5rem 0;
  }

  .blog_card_link {
    color: var(--color-text);
    text-decoration: none;

    @media (hover: hover) {
      &:hover {
        color: var(--color-primary);
      }
    }
  }

  .blog_card_description {
    font-size: var(--text-base);
    color: var(--color-text);
    line-height: var(--line-height-lg);
    margin: 0 0 0.75rem 0;
  }

  /* "WhatsApp · Segurança  09 de setembro de 2026  4 min de leitura" */
  .blog_meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    margin: 0;
    font-size: var(--text-sm);
    color: var(--color-text-light);
  }

  .blog_meta_tags {
    color: var(--color-primary);
    font-weight: var(--font-weight-medium);
  }

  .blog_back {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 2rem;
    font-size: var(--text-sm);
    color: var(--color-text-light);
    text-decoration: none;

    svg {
      width: 18px;
      height: 18px;
    }

    @media (hover: hover) {
      &:hover {
        color: var(--color-text);
      }
    }
  }

  .blog_article {
    max-width: 65ch;
  }

  .blog_article_header {
    margin-bottom: 2rem;

    .blog_title {
      font-size: var(--text-3xl);
      margin-bottom: 0.75rem;
    }
  }

  .blog_article_body {
    font-size: var(--text-base);
    color: var(--color-text);
    line-height: var(--line-height-xl);

    h2 {
      font-size: var(--text-xl);
      font-weight: var(--font-weight-bold);
      line-height: var(--line-height-base);
      margin: 2.5rem 0 0.75rem 0;
    }

    h3 {
      font-size: var(--text-lg);
      font-weight: var(--font-weight-bold);
      line-height: var(--line-height-md);
      margin: 2rem 0 0.5rem 0;
    }

    p {
      margin: 0 0 1rem 0;
    }

    ul,
    ol {
      margin: 0 0 1rem 0;
      padding-left: 1.25rem;
    }

    li {
      margin-bottom: 0.5rem;
    }

    /* Prose links, not the buttons the CTA cards carry. */
    a:not(.btn) {
      color: var(--color-primary);
      text-decoration: underline;
      text-underline-offset: 0.15em;
    }

    em {
      font-style: italic;
    }
  }

  /* The product card the post carries between its argument and the comparison */
  .blog_cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 2.5rem 0;
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-bg-card);

    .brand_logo {
      padding-top: 0;
    }
  }

  .blog_cta_title {
    margin: 0;
    font-size: var(--text-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
  }

  .blog_cta_tagline {
    margin: 0;
    font-size: var(--text-base);
    color: var(--color-text-light);
  }

  .blog_references {
    font-size: var(--text-sm);
    color: var(--color-text-light);
    overflow-wrap: anywhere;
  }
}
