/* Blog styles — same design tokens as the Licita-IA landing */
:root {
  --bg-base: #050814;
  --bg-surface: #0d1225;
  --bg-surface2: #141931;
  --bg-glass: rgba(13, 18, 37, 0.7);
  --brand: #5b53e8;
  --brand-light: #7b73f5;
  --brand-glow: rgba(91, 83, 232, 0.35);
  --accent: #00d4aa;
  --accent-light: #33dfb8;
  --text-primary: #e8eaff;
  --text-muted: #8b90b8;
  --text-faint: #4b5280;
  --border: rgba(91, 83, 232, 0.18);
  --border-light: rgba(255, 255, 255, 0.06);
  --green: #10b981;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  line-height: 1.25;
  color: var(--text-primary);
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

.blog-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
}

.blog-header__inner {
  margin: 0 auto;
  max-width: 80rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem;
}

@media (min-width: 1024px) {
  .blog-header__inner {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.blog-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
}

.blog-brand__mark {
  display: flex;
  height: 2.25rem;
  width: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: var(--brand);
}

.blog-nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .blog-nav {
    display: flex;
  }
}

.blog-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

.blog-nav a:hover {
  color: var(--text-primary);
}

.blog-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: var(--accent);
  color: #050814;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  transition: filter 0.2s;
}

.blog-cta:hover {
  filter: brightness(1.08);
}

.blog-cta--lg {
  width: 100%;
  padding: 0.9rem 1.25rem;
  font-size: 1rem;
}

@media (min-width: 640px) {
  .blog-cta--lg {
    width: auto;
  }
}

.blog-shell {
  margin: 0 auto;
  max-width: 80rem;
  padding: 2rem 1rem 4rem;
}

@media (min-width: 1024px) {
  .blog-shell {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.blog-hero {
  margin-bottom: 2.5rem;
}

.blog-kicker {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.blog-hero h1 {
  max-width: 40rem;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.blog-hero p {
  max-width: 40rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.blog-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.blog-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: 1rem;
  background: var(--bg-surface);
  transition: border-color 0.2s, transform 0.2s;
}

.blog-card:hover {
  border-color: var(--border);
  transform: translateY(-2px);
}

.blog-card__cover {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--bg-surface2);
  overflow: hidden;
  border-radius: 1rem 1rem 0 0;
  isolation: isolate;
}

.blog-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.blog-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.1rem 1.15rem 1.25rem;
}

.blog-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-faint);
}

.blog-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

.blog-card__excerpt {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.blog-tag {
  border-radius: 999px;
  border: 1px solid var(--border-light);
  background: var(--bg-surface2);
  padding: 0.2rem 0.55rem;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.blog-pagination {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
}

.blog-pagination a,
.blog-pagination span {
  border-radius: 0.65rem;
  border: 1px solid var(--border-light);
  padding: 0.45rem 0.8rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.blog-pagination a:hover {
  border-color: var(--border);
  color: var(--text-primary);
}

.blog-pagination .is-active {
  background: var(--brand-dim, rgba(91, 83, 232, 0.12));
  border-color: var(--border);
  color: var(--text-primary);
}

.blog-post {
  display: grid;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .blog-post {
    grid-template-columns: minmax(0, 1fr) 16rem;
    align-items: start;
  }
}

.blog-article {
  max-width: 46rem;
}

.blog-article__cover {
  margin: 0 0 1.5rem;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--border-light);
  isolation: isolate;
  max-height: 22rem;
}

.blog-article__cover img {
  width: 100%;
  height: 100%;
  max-height: 22rem;
  object-fit: cover;
}

.blog-article__cover img {
  width: 100%;
  height: auto;
}

.blog-article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--text-faint);
}

.blog-article h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.blog-prose {
  color: var(--text-muted);
  font-size: 1.02rem;
}

.blog-prose > * + * {
  margin-top: 1.1rem;
}

.blog-prose h2 {
  margin-top: 2.2rem;
  font-size: 1.45rem;
  font-weight: 700;
}

.blog-prose h3 {
  margin-top: 1.6rem;
  font-size: 1.15rem;
  font-weight: 650;
}

.blog-prose p,
.blog-prose li {
  color: var(--text-muted);
}

.blog-prose strong {
  color: var(--text-primary);
  font-weight: 600;
}

.blog-prose a {
  color: var(--accent-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blog-prose ul,
.blog-prose ol {
  padding-left: 1.25rem;
}

.blog-prose li + li {
  margin-top: 0.4rem;
}

.blog-prose blockquote {
  border-left: 3px solid var(--brand);
  padding-left: 1rem;
  color: var(--text-primary);
  background: rgba(91, 83, 232, 0.08);
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 0.85rem 1rem;
}

.blog-prose code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.9em;
  background: var(--bg-surface2);
  border-radius: 0.3rem;
  padding: 0.1rem 0.35rem;
}

.blog-cta-box {
  margin-top: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: linear-gradient(145deg, rgba(91, 83, 232, 0.16), rgba(0, 212, 170, 0.08));
  padding: 1.4rem 1.35rem;
}

.blog-cta-box h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.blog-cta-box p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.blog-mid-cta {
  margin: 1.75rem 0;
  border: 1px solid rgba(0, 212, 170, 0.28);
  border-radius: 1rem;
  background:
    radial-gradient(circle at top right, rgba(0, 212, 170, 0.12), transparent 55%),
    var(--bg-surface);
  padding: 1.15rem 1.2rem;
}

.blog-mid-cta__kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.blog-mid-cta__title {
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.blog-mid-cta__text {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 0.85rem;
}

.blog-mid-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.blog-mid-cta__ghost {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.blog-mid-cta__ghost:hover {
  color: var(--accent);
}

.blog-next-steps {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

.blog-next-steps h2 {
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 1.35rem;
  margin-bottom: 0.4rem;
}

.blog-next-steps__lead {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.blog-next-steps__grid {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 720px) {
  .blog-next-steps__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-next-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--bg-surface);
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}

.blog-next-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.blog-next-card--accent {
  background: linear-gradient(145deg, rgba(0, 212, 170, 0.12), rgba(91, 83, 232, 0.12));
}

.blog-next-card__tag {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.blog-next-card strong {
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 1rem;
  color: var(--text-primary);
}

.blog-next-card span:last-child {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.blog-aside__links {
  list-style: none;
  margin: 0 0 0.9rem;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.blog-aside__links a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.blog-aside__links a:hover {
  color: var(--accent);
}

.blog-hub-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
}

.blog-hub-strip a {
  border: 1px solid var(--border-light);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  background: rgba(5, 8, 20, 0.35);
}

.blog-hub-strip a:hover,
.blog-hub-strip a.is-accent {
  border-color: var(--accent);
  color: var(--text-primary);
  background: rgba(0, 212, 170, 0.1);
}

.blog-aside {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.blog-aside__box {
  border: 1px solid var(--border-light);
  border-radius: 1rem;
  background: var(--bg-surface);
  padding: 1rem;
}

.blog-aside__box h2 {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.blog-related a {
  display: block;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.blog-related a:last-child {
  border-bottom: 0;
}

.blog-related a:hover {
  color: var(--accent-light);
}

.blog-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--border-light);
  background: var(--bg-surface);
}

.blog-footer__inner {
  margin: 0 auto;
  max-width: 80rem;
  padding: 2rem 1rem;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .blog-footer__inner {
    grid-template-columns: 2fr 1fr 1fr;
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.blog-footer h3 {
  font-size: 0.85rem;
  margin-bottom: 0.65rem;
}

.blog-footer p,
.blog-footer a {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.blog-footer a:hover {
  color: var(--text-primary);
}

.blog-footer ul {
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.blog-footer__legal {
  grid-column: 1 / -1;
  border-top: 1px solid var(--border-light);
  padding-top: 1rem;
  font-size: 0.75rem;
  color: var(--text-faint);
}

.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;
}


.is-hidden {
  display: none !important;
}

.blog-search {
  margin: 0 0 2.25rem;
}

.blog-search__panel {
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  background:
    radial-gradient(circle at top right, rgba(0, 212, 170, 0.16), transparent 42%),
    linear-gradient(145deg, rgba(91, 83, 232, 0.22), rgba(13, 18, 37, 0.95));
  box-shadow: 0 0 0 1px rgba(0, 212, 170, 0.08), 0 18px 50px rgba(0, 0, 0, 0.28);
  padding: 1.25rem 1.15rem 1.35rem;
}

@media (min-width: 768px) {
  .blog-search__panel {
    padding: 1.5rem 1.5rem 1.6rem;
  }
}

.blog-search__label {
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
}

.blog-search__form {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .blog-search__form {
    grid-template-columns: 1fr auto;
    align-items: stretch;
  }
}

.blog-search__input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.9rem;
  background: rgba(5, 8, 20, 0.72);
  color: var(--text-primary);
  font-size: 1rem;
  padding: 0.95rem 1rem;
  outline: none;
}

.blog-search__input::placeholder {
  color: var(--text-faint);
}

.blog-search__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.2);
}

.blog-search__submit {
  border: 0;
  border-radius: 0.9rem;
  background: var(--accent);
  color: #050814;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.95rem 1.25rem;
  cursor: pointer;
  transition: filter 0.2s;
}

.blog-search__submit:hover {
  filter: brightness(1.08);
}

.blog-search__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.95rem;
}

.blog-search__chip {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(5, 8, 20, 0.45);
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.blog-search__chip:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  background: rgba(0, 212, 170, 0.1);
}

.blog-search__hint,
.blog-search__empty {
  margin-top: 0.85rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.blog-search__empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--border-light);
  border-radius: 1rem;
  padding: 1.25rem;
  background: var(--bg-surface);
}
