/* CDA La Estrella blog */
.blog-page { --blog-ink: #171717; --blog-muted: #5f5f59; --blog-line: #e6e4dc; --blog-yellow: #fff23f; }
.blog-breadcrumbs { justify-content: center; width: 100%; margin: 0 0 1.1rem; color: #fff; }
.blog-breadcrumbs ol { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.blog-breadcrumbs li + li::before { margin-right: .45rem; color: currentColor; content: '/'; opacity: .7; }
.blog-breadcrumbs a { color: inherit; text-decoration-color: rgb(255 255 255 / 55%); }
.blog-breadcrumbs [aria-current="page"] { color: inherit; }
.blog-hero { position: relative; display: grid; min-height: 600px; align-items: center; overflow: hidden; isolation: isolate; background: #171717; color: #fff; text-align: center; }
.blog-hero-image, .blog-hero-overlay { position: absolute; z-index: -1; inset: 0; }
.blog-hero-image { background-image: url('/assets/images/blog-inspeccion-hero-1440.webp'); background-image: image-set(url('/assets/images/blog-inspeccion-hero-1440.webp') 1x, url('/assets/images/blog-inspeccion-hero.webp') 2x); background-position: center 54%; background-size: cover; background-repeat: no-repeat; }
.blog-hero-overlay { background: linear-gradient(90deg, rgb(13 15 16 / 83%), rgb(13 15 16 / 58%) 57%, rgb(13 15 16 / 45%)); }
.blog-hero-content { max-width: 980px; padding-block: 4rem; }
.blog-hero-content .eyebrow { color: var(--blog-yellow); }
.blog-hero h1 { max-width: 900px; margin: .8rem auto 1rem; font-size: clamp(2.45rem, 5.5vw, 4.6rem); line-height: 1.06; }
.blog-hero p { max-width: 790px; margin: 0 auto; color: #f1f1ed; font-size: clamp(1rem, 1.5vw, 1.16rem); line-height: 1.7; }
.blog-hero-cta { display: inline-flex; align-items: center; gap: .55rem; margin-top: 1.5rem; padding: .85rem 1.3rem; border: 1px solid #171717; border-radius: 999px; color: #171717; font-weight: 800; text-decoration: none; }
.blog-hero-cta:hover { background: #fff; }
.blog-categories > .container, .blog-latest > .container, .related-posts-section > .container, .author-page .container, .author-posts > .container { width: min(var(--max), calc(100% - 48px)); max-width: var(--max); padding-inline: 0; }
.blog-section-heading { max-width: 830px; margin: 0 auto 2.2rem; text-align: center; }
.blog-section-heading h2 { margin: .55rem 0 .75rem; font-size: clamp(1.85rem, 3.5vw, 2.75rem); }
.blog-section-heading p { margin: 0 auto; color: var(--blog-muted); line-height: 1.7; }
.blog-categories { padding-block: clamp(3.5rem, 7vw, 6rem); background: #f7f7f3; }
.blog-category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.blog-category-card { display: flex; min-height: 235px; flex-direction: column; align-items: center; padding: 1.45rem 1.2rem 1.2rem; border: 1px solid var(--blog-line); border-radius: 16px; background: #fff; color: var(--blog-ink); text-align: center; cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background-color .18s ease; }
.blog-category-card:hover, .blog-category-card[aria-pressed="true"] { border-color: #d5c900; box-shadow: 0 12px 28px rgb(17 17 17 / 8%); transform: translateY(-3px); }
.blog-category-card[aria-pressed="true"] { background: #fffef0; }
.blog-category-icon { display: grid; width: 52px; height: 52px; flex: none; place-items: center; margin-bottom: .85rem; border-radius: 15px; background: var(--blog-yellow); color: var(--blog-ink); }
.blog-category-icon svg { width: 28px; height: 28px; }
.blog-category-name { margin-bottom: .45rem; font: 800 1rem/1.35 Manrope, sans-serif; }
.blog-category-description { color: var(--blog-muted); font-size: .86rem; line-height: 1.5; }
.blog-category-count { margin-top: auto; padding-top: .8rem; color: #494942; font-size: .75rem; font-weight: 800; }
.blog-latest { padding-block: clamp(3.5rem, 7vw, 6rem); }
.blog-filter-row { display: flex; align-items: center; gap: 1rem; margin: 0 0 1.35rem; }
.blog-filter-reset { min-height: 42px; padding: .6rem 1rem; border: 1px solid #c9c7bd; border-radius: 999px; background: #fff; color: var(--blog-ink); font: 800 .82rem 'DM Sans', sans-serif; cursor: pointer; }
.blog-filter-reset:hover, .blog-filter-reset[aria-pressed="true"] { border-color: var(--blog-ink); background: var(--blog-ink); color: #fff; }
.blog-filter-status { margin: 0; color: var(--blog-muted); font-size: .84rem; }
.blog-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; align-items: stretch; }
.blog-card { min-width: 0; overflow: hidden; border: 1px solid var(--blog-line); border-radius: 17px; background: #fff; box-shadow: 0 6px 24px rgb(17 17 17 / 4%); transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease; }
.blog-card[hidden] { display: none; }
.blog-card:hover { border-color: #d6cd36; box-shadow: 0 15px 35px rgb(17 17 17 / 10%); transform: translateY(-4px); }
.blog-card-link { display: flex; height: 100%; flex-direction: column; color: inherit; text-decoration: none; }
.blog-card-link:focus-visible { outline: 3px solid #756c00; outline-offset: -4px; }
.blog-card-image { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.blog-card-content { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 1.25rem; }
.blog-card-category { margin-bottom: .55rem; color: #666009; font-size: .69rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.blog-card h3 { margin: 0 0 .6rem; font: 800 clamp(1.08rem, 1.6vw, 1.3rem)/1.3 Manrope, sans-serif; }
.blog-card-excerpt { margin: 0; color: var(--blog-muted); font-size: .9rem; line-height: 1.6; }
.blog-card-meta { display: flex; flex-wrap: wrap; gap: .35rem .85rem; margin-top: 1rem; color: #666; font-size: .75rem; }
.blog-card-read { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: auto; padding-top: 1rem; color: #232323; font-size: .85rem; font-weight: 800; }
.blog-card:hover .blog-card-read { color: #655b00; }
.blog-empty-state { margin: 1.5rem 0 0; padding: 1.3rem; border: 1px dashed #c8c6b9; border-radius: 12px; background: #fafaf7; color: var(--blog-muted); text-align: center; }
.blog-empty-state[hidden] { display: none; }

/* Article and author templates */
.article-hero { padding: clamp(2.5rem, 6vw, 5rem) 0; background: radial-gradient(ellipse at 12% 4%, rgb(255 255 255 / 58%), transparent 46%), radial-gradient(ellipse at 92% 100%, rgb(230 202 0 / 24%), transparent 44%), linear-gradient(115deg, #fffbb8 0%, #fff66b 36%, #fff23f 68%, #f4dd00 100%); color: #171717; }
.article-hero-inner { max-width: 1000px; text-align: center; }
.article-hero .blog-breadcrumbs { justify-content: center; margin-bottom: 1.7rem; color: #333; }
.article-hero .blog-breadcrumbs ol { justify-content: center; }
.article-hero .blog-breadcrumbs a { text-decoration-color: #777; }
.article-hero .eyebrow { color: #4d4700; }
.article-hero h1 { max-width: 900px; margin: .65rem auto 1rem; font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.12; }
.article-deck { max-width: 800px; margin: 0 auto; color: #29291f; font-size: clamp(1rem, 1.5vw, 1.14rem); line-height: 1.7; }
.article-hero-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .65rem 1.3rem; margin-top: 1.45rem; color: #373528; font-size: .84rem; }
.article-hero-meta a { color: inherit; font-weight: 800; text-underline-offset: 3px; }
.article-category-pill { padding: .45rem .7rem; border: 1px solid rgb(23 23 23 / 28%); border-radius: 999px; text-decoration: none; }
.article-layout { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); justify-content: stretch; gap: clamp(1.2rem, 2.5vw, 2.25rem); padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.toc-wrap { align-self: stretch; }
.article-toc { position: sticky; top: 110px; padding: 1.3rem; border: 1px solid var(--blog-line); border-top: 4px solid var(--blog-yellow); border-radius: 13px; background: #fafaf7; }
.article-toc summary { color: #222; font: 800 1.12rem Manrope, sans-serif; cursor: pointer; }
.article-toc nav { padding-top: .85rem; }
.article-toc ol { display: grid; gap: .65rem; margin: 0; padding-left: 1.25rem; }
.article-toc li { color: #696960; font-size: .9rem; line-height: 1.45; }
.article-toc a { color: #3f3f3a; text-decoration-color: #c6c4b8; text-underline-offset: 3px; }
.article-toc a:hover, .article-toc a[aria-current="location"] { color: #665c00; text-decoration-color: #665c00; }
.article-content { min-width: 0; margin: 0; font-size: 1.02rem; line-height: 1.78; }
.article-content > p:first-child { margin-top: 0; font-size: 1.1rem; color: #373733; }
.article-content h2 { margin: 2.6rem 0 .8rem; scroll-margin-top: 110px; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.25; }
.article-content h3 { margin-top: 1.5rem; font-size: 1.2rem; }
.article-content p, .article-content li { color: #4b4b46; }
.article-content li { margin-block: .45rem; }
.article-content a { color: #484000; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article-content section { scroll-margin-top: 100px; }
.article-content .faq-list { margin-top: .8rem; }
.blog-faq-list details { padding: 1rem 0; }
.blog-faq-list summary { line-height: 1.5; }
.article-publication { margin-top: 2.3rem; }
.article-publication > p { font-size: .88rem; }
.editorial-banner { display: flex; align-items: flex-start; gap: .9rem; padding: 1.2rem; border: 1px solid #292929; border-radius: 13px; background: #191919; color: #fff; }
.editorial-check { display: grid; width: 32px; height: 32px; flex: none; place-items: center; border-radius: 50%; background: var(--blog-yellow); color: #171717; font-weight: 900; }
.editorial-banner strong { color: var(--blog-yellow); }
.editorial-banner p { margin: .3rem 0 0; color: #e2e2dd; font-size: .85rem; line-height: 1.55; }
.author-card { display: flex; align-items: center; gap: 1.35rem; margin-top: 2rem; padding: 1.5rem; border: 1px solid var(--blog-line); border-radius: 16px; background: #f8f8f5; }
.author-card > img { width: 116px; height: 116px; flex: 0 0 116px; padding: .8rem; border: 1px solid var(--blog-line); border-radius: 50%; background: #fff; object-fit: contain; }
.author-card .eyebrow { color: #615900; }
.author-card h2 { margin: .3rem 0 .45rem; font-size: 1.35rem; }
.author-card p { margin: 0 0 .7rem; font-size: .9rem; }
.author-card .text-link { font-weight: 800; }
.related-posts-section { width: 100%; padding-block: clamp(2.5rem, 5vw, 4rem); background: #f8f8f5; }
.related-posts { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; padding: 0; text-align: center; }
.related-posts h2 { margin: .35rem 0 1.5rem; font-size: 1.65rem; }
.related-empty, .editorial-note { color: var(--blog-muted); font-size: .9rem; }
.author-hero { padding: 3rem 0 3.5rem; background: linear-gradient(120deg, #fff76b, #fff23f 60%, #f0df00); text-align: center; }
.author-hero .blog-breadcrumbs { justify-content: center; margin-bottom: 1.5rem; color: #333; }
.author-hero .blog-breadcrumbs ol { justify-content: center; }
.author-hero h1 { margin: .4rem 0; font-size: clamp(2.5rem, 5vw, 4rem); }
.author-hero p { max-width: 900px; margin: 0 auto; color: #333; line-height: 1.65; }
.author-profile { display: grid; grid-template-columns: minmax(180px, 300px) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; width: 100%; max-width: none; margin-inline: auto; text-align: left; }
.author-logo-frame { display: grid; min-height: 150px; place-items: center; padding: 1.2rem; border: 1px solid var(--blog-line); border-radius: 18px; background: #fff; }
.author-logo-frame img { width: 100%; height: auto; }
.author-profile > div:last-child { max-width: none; text-align: left; }
.author-profile h2 { margin: .35rem 0 .7rem; font-size: 1.75rem; }
.author-profile h3 { margin: 1.4rem 0 .5rem; }
.author-profile p, .author-profile li { color: var(--blog-muted); line-height: 1.7; }
.author-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem 1.5rem; width: min(800px, 100%); margin-inline: auto; padding-left: 1.2rem; text-align: left; }
.author-posts { padding-top: clamp(3.5rem, 7vw, 6rem); }
.author-page .blog-card-content { align-items: center; text-align: center; }
.author-page .blog-card-meta { justify-content: center; }
.author-page .blog-card-read { max-width: 300px; margin-inline: auto; }
@media (max-width: 1000px) { .blog-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .article-layout { grid-template-columns: minmax(190px, 230px) minmax(0, 1fr); gap: 2rem; } }
@media (max-width: 700px) {
  .blog-hero { min-height: 600px; }
  .blog-hero-image { background-position: 57% center; }
  .blog-hero-overlay { background: linear-gradient(0deg, rgb(13 15 16 / 83%), rgb(13 15 16 / 55%)); }
  .blog-hero-content { padding: 3rem 1rem; }
  .blog-hero h1 { font-size: clamp(2.1rem, 10vw, 3rem); }
  .blog-category-grid, .blog-card-grid { grid-template-columns: 1fr; }
  .blog-category-card { min-height: 205px; }
  .blog-filter-row { align-items: flex-start; flex-direction: column; gap: .6rem; }
  .blog-card-content { align-items: center; text-align: center; }
  .blog-card-meta { justify-content: center; }
  .blog-card-read { max-width: 300px; }
  .article-hero { padding-block: 2.5rem; }
  .article-hero h1 { font-size: clamp(2rem, 9vw, 2.9rem); }
  .article-layout { display: flex; flex-direction: column; gap: 1rem; padding-block: 1.5rem 3rem; }
  .article-toc { position: static; }
  .article-toc:not([open]) nav { display: none; }
  .article-content { font-size: 1rem; }
  .article-content h2 { margin-top: 2rem; font-size: 1.55rem; }
  .author-card { align-items: center; flex-direction: column; text-align: center; }
  .author-profile { grid-template-columns: 1fr; }
  .author-logo-frame { width: min(200px, 100%); margin-inline: auto; }
  .author-profile > div:last-child { text-align: center; }
  .author-topics { grid-template-columns: 1fr; text-align: left; }
  .author-posts .blog-card-content { text-align: center; }
}
/* El layout global vuelve algunas .section de tablet en grids dobles. El blog
   usa secciones de ancho completo y listas de una sola columna. */
.blog-page > .section { display: block; }
.blog-page .blog-category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
.blog-page .blog-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
.blog-page .blog-category-card { width: 100%; min-height: 235px; flex-direction: column; align-items: center; gap: 0; padding: 1.45rem 1.2rem 1.2rem; text-align: center; }
.blog-page .blog-category-icon { margin: 0 0 .85rem; }
.blog-page .blog-category-name { width: auto; margin: 0 0 .45rem; }
.blog-page .blog-category-description { flex: initial; }
.blog-page .blog-category-count { margin: auto 0 0; padding: .8rem 0 0; white-space: normal; }
.blog-page .blog-card-link { flex-direction: column; }
.blog-page .blog-card-image { width: 100%; height: auto; flex: none; aspect-ratio: 4 / 3; }
.blog-page .blog-card-content { align-items: flex-start; text-align: left; }
.author-page .blog-card-content { align-items: center; text-align: center; }
.author-page .author-hero .container { text-align: center; }
.author-page .author-hero h1, .author-page .author-hero p { margin-inline: auto; text-align: center; }
.author-profile { grid-template-columns: minmax(180px, 300px) minmax(0, 1fr); width: 100%; max-width: none; text-align: left; }
.author-page .author-profile > div:last-child { max-width: none; text-align: left; }
.author-profile .author-logo-frame { width: 100%; margin: 0; }
@media (max-width: 1000px) {
  .blog-page .blog-category-grid, .blog-page .blog-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .blog-page .blog-category-card { min-height: 0; flex-direction: column; gap: .6rem; padding: 1.25rem; text-align: center; }
  .blog-page .blog-category-icon { margin-bottom: .15rem; }
  .blog-page .blog-category-name { width: auto; margin: 0; }
  .blog-page .blog-category-description { flex: initial; }
  .blog-page .blog-category-count { margin: .25rem 0 0; padding: 0; }
  .blog-page .blog-card-link { flex-direction: column; }
  .blog-page .blog-card-image { width: 100%; flex-basis: auto; aspect-ratio: 4 / 3; }
  .blog-page .blog-card-content { align-items: center; text-align: center; }
  .blog-page .blog-category-grid, .blog-page .blog-card-grid { grid-template-columns: minmax(0, 1fr); }
  .author-profile { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .author-profile .author-logo-frame { width: min(280px, 100%); margin-inline: auto; }
  .blog-filter-row { align-items: center; }
  .blog-filter-reset { margin-inline: auto; }
  .blog-filter-status { display: none; }
  .author-page .author-profile > div:last-child { text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .blog-category-card, .blog-card { transition: none; } html:has(.blog-page) { scroll-behavior: auto; } }

/* Ajustes de arquitectura del blog: secciones a ancho completo y contenido
   alineado al mismo contenedor global del sitio. */
.blog-page > .section { display: block; width: 100%; }
.blog-hero { height: 600px; min-height: 600px; }
.blog-page > .section > .container,
.blog-page .related-posts,
.author-page .container { width: min(var(--max, 1200px), calc(100% - 48px)); max-width: var(--max, 1200px); margin-inline: auto; padding-inline: 0; }
.blog-category-grid, .blog-card-grid { width: 100%; }
.blog-category-card { cursor: pointer; text-decoration: none; }
.blog-category-card:focus-visible { outline: 3px solid #756c00; outline-offset: 3px; }
.blog-category-count { display: none; }
.blog-filter-row { justify-content: center; }
.blog-filter-reset { display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; }
.article-toc a[aria-current="location"] { color: #4b4300; font-weight: 800; text-decoration-line: underline; text-decoration-color: var(--blog-yellow); text-decoration-thickness: 3px; text-underline-offset: 5px; transition: color .18s ease, text-decoration-color .18s ease; }
.category-hero { position: relative; display: grid; min-height: 520px; align-items: center; overflow: hidden; isolation: isolate; background: #171717 var(--category-image) center 52% / cover no-repeat; color: #fff; text-align: center; }
.category-hero-overlay { position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgb(13 15 16 / 76%), rgb(13 15 16 / 52%) 58%, rgb(13 15 16 / 44%)); }
.category-hero-content { max-width: 1000px; padding-block: 4rem; }
.category-hero .blog-breadcrumbs { color: #fff; }
.category-hero .eyebrow { color: var(--blog-yellow); }
.category-hero h1 { max-width: 940px; margin: .7rem auto 1rem; font-size: clamp(2.4rem, 5.2vw, 4.4rem); line-height: 1.08; }
.category-hero p { max-width: 820px; margin-inline: auto; color: #f4f4f1; font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.7; }
.category-explore { background: #f7f7f3; }
.category-posts { background: #fff; }
.category-page .blog-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.category-page .blog-category-card { min-height: 210px; }
.category-page .blog-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.category-page .blog-empty-state p { margin-top: 0; }
.author-page .blog-card-content { align-items: flex-start; text-align: left; }
.author-page .blog-card-meta { justify-content: flex-start; }
.author-page .blog-card-read { max-width: none; margin-inline: 0; }
.author-page .author-profile { width: 100%; max-width: none; }
.author-page .author-profile > div:last-child { text-align: left; }
@media (max-width: 1000px) {
  .category-page .blog-category-grid, .category-page .blog-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .blog-page > .section > .container, .blog-page .related-posts, .author-page .container { width: calc(100% - 36px); }
  .blog-filter-row { align-items: center; }
  .blog-filter-reset { margin-inline: auto; }
  .category-hero { min-height: 470px; }
  .category-hero-overlay { background: linear-gradient(0deg, rgb(13 15 16 / 80%), rgb(13 15 16 / 53%)); }
  .category-hero-content { padding: 3rem 1rem; }
  .category-hero h1 { font-size: clamp(2rem, 9vw, 3rem); }
  .category-page .blog-category-grid, .category-page .blog-card-grid { grid-template-columns: minmax(0, 1fr); }
  .author-page .blog-card-content { align-items: flex-start; text-align: left; }
  .author-page .blog-card-meta { justify-content: flex-start; }
  .author-page .author-profile > div:last-child { text-align: center; }
}
