/* Blog, artículos y páginas legales de avantdevices.com */

.blog-hero { padding-block: clamp(48px, 7vw, 88px) clamp(24px, 4vw, 40px); background: linear-gradient(180deg, #fff 0%, var(--c-surface) 100%); }
.blog-hero h1 { max-width: 820px; }
.blog-hero p { max-width: 640px; color: var(--c-muted); font-size: 1.125rem; margin: 0; }

/* ---------- Último artículo ---------- */
.post-lead {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 0; text-decoration: none; color: inherit;
  border: 1px solid var(--c-line); border-radius: var(--radius-l); overflow: hidden; background: #fff; box-shadow: var(--shadow-s);
}
.post-lead__media img { width: 100%; height: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.post-lead__body { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: clamp(24px, 3vw, 40px); }
.post-lead__title { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem); line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; color: var(--c-ink); }
.post-lead time { font-size: .875rem; color: var(--c-muted); }
.post-lead:hover .post-lead__title { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 860px) { .post-lead { grid-template-columns: 1fr; } }

/* ---------- Rejilla de artículos ---------- */
.related__title { font-size: 1.5rem; margin-bottom: 24px; }
.related__title .muted { font-size: 1rem; font-weight: 400; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 0; padding: 0; list-style: none; }
.post-card__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; border: 1px solid var(--c-line); border-radius: var(--radius-l); overflow: hidden; background: #fff; transition: box-shadow .2s, transform .2s; }
.post-card__link:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.post-card__media img, .post-card__noimg { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--c-surface-2); }
.post-card__body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 22px; }
.post-card__body time { font-size: .8125rem; color: var(--c-muted); }
.post-card__title { font-size: 1.125rem; font-weight: 600; line-height: 1.3; color: var(--c-ink); }
.post-card__link:hover .post-card__title { text-decoration: underline; text-underline-offset: 3px; }
.post-card__excerpt { font-size: .9375rem; color: var(--c-muted); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 960px) { .post-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .post-grid { grid-template-columns: 1fr; } }

/* ---------- Artículo ---------- */
.post__head { max-width: calc(800px + var(--gutter) * 2); padding-top: clamp(40px, 6vw, 72px); }
.post__head h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3rem); }
.crumbs { font-size: .875rem; color: var(--c-muted); margin-bottom: 20px; }
.crumbs a { color: var(--c-muted); }
.crumbs a:hover { color: var(--c-ink); }
.post__meta { color: var(--c-muted); font-size: .9375rem; }
.post__wrap { max-width: calc(800px + var(--gutter) * 2); padding-bottom: clamp(40px, 6vw, 64px); }
.post__cover { margin: 8px 0 40px; }
.post__cover img { width: 100%; border-radius: var(--radius-l); aspect-ratio: 16 / 9; object-fit: cover; }
.post__back { margin-top: 40px; }

/* Tipografía de lectura */
.prose { font-size: 1.125rem; line-height: 1.75; color: var(--c-text); }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin: 0; }
.prose h2, .prose h3, .prose h4, .prose h5, .prose h6 { margin: 1.8em 0 .2em; line-height: 1.25; letter-spacing: -0.015em; }
.prose h2 { font-size: 1.75rem; font-weight: 700; }
.prose h3 { font-size: 1.375rem; }
.prose h4, .prose h5, .prose h6 { font-size: 1.125rem; }
.prose a { color: var(--c-accent-text); text-underline-offset: 3px; overflow-wrap: anywhere; }
.prose strong { color: var(--c-ink); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 1em 0 0; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--c-accent); }
.prose img { border-radius: var(--radius); margin-inline: auto; height: auto; }
.prose figure { margin: 1.6em 0; }
.prose figcaption { margin-top: 8px; font-size: .875rem; color: var(--c-muted); text-align: center; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--c-accent); color: var(--c-ink); font-size: 1.1875rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: 1rem; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--c-line); text-align: left; vertical-align: top; }
.prose th { background: var(--c-surface); color: var(--c-ink); }
.prose hr { border: 0; border-top: 1px solid var(--c-line); margin: 2em 0; }
