/* Gracia — blog: lista, categorías y artículo, con los colores y la tipografía de la landing */

/* ---------- Cabecera de la lista ---------- */
.bl-hero { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding: clamp(40px, 6vw, 96px) 0 clamp(30px, 3.6vw, 52px); }
.bl-title { max-width: 18ch; font-size: clamp(34px, 4.6vw, 66px); }
.bl-lead { max-width: 52ch; font-size: clamp(16px, 1.25vw, 19px); }
.bl-lead p { margin: 0; }

.bl-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.bl-cats a { border-radius: 50px; padding: 9px 16px; font-size: 14px; background: var(--paper); color: var(--link); box-shadow: inset 0 0 0 1px rgba(26,20,54,0.08); transition: background .25s ease, color .25s ease, box-shadow .25s ease; }
.bl-cats a:hover { color: var(--purple-dark); box-shadow: inset 0 0 0 1.5px rgba(122,72,232,0.45); }
.bl-cats a.is-on { background: var(--purple); color: #fff; box-shadow: 0 8px 20px rgba(122,72,232,0.26); }

/* ---------- Grilla de artículos ---------- */
.bl-list { position: relative; z-index: 1; padding-bottom: clamp(70px, 8vw, 120px); }
.bl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 34px); }
.bl-card { position: relative; display: flex; flex-direction: column; gap: 12px; border-radius: 28px; background: var(--paper); padding: 12px 12px 26px; box-shadow: 0 20px 50px rgba(26,20,54,0.06); transition: transform .45s var(--ease), box-shadow .45s ease; }
.bl-card:hover { transform: translateY(-4px); box-shadow: 0 28px 60px rgba(26,20,54,0.1); }
.bl-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 20px; background: rgb(244,240,254); }
.bl-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.bl-card:hover .bl-img img { transform: scale(1.04); }
.bl-ph { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 64px; height: 64px; margin: auto; position: relative; top: 50%; transform: translateY(-50%); }
.bl-ph i { border-radius: 50%; background: var(--purple); }
.bl-ph i:nth-child(2), .bl-ph i:nth-child(3) { background: var(--lilac); }
.bl-meta, .bl-h, .bl-ex { padding: 0 12px; }
.bl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.bl-meta b { font-weight: 500; color: var(--purple); }
.bl-h { font-weight: 600; font-size: 20px; line-height: 1.25; letter-spacing: -0.03em; color: var(--ink); }
.bl-h a { color: inherit; transition: color .25s ease; }
.bl-h a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.bl-card:hover .bl-h a { color: var(--purple-dark); }
.bl-ex { font-size: 15px; line-height: 1.6; color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

@media (min-width: 981px) {
  .bl-grid--dest .bl-card:first-child { grid-column: span 2; }
  .bl-grid--dest .bl-card:first-child .bl-h { font-size: clamp(24px, 2.2vw, 32px); }
}
@media (max-width: 980px) { .bl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .bl-grid { grid-template-columns: 1fr; } }

.bl-vacio { padding: 40px 0; }

/* Paginación (clase propia: .nav-links es del menú y se esconde en celular) */
.bl-pag { margin-top: 48px; }
.bl-pag ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.bl-pag a, .bl-pag span { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; height: 46px; padding: 0 16px; border-radius: 50px; font-size: 15px; background: var(--paper); color: var(--link); box-shadow: inset 0 0 0 1px rgba(26,20,54,0.08); }
.bl-pag a:hover { color: var(--purple-dark); box-shadow: inset 0 0 0 1.5px rgba(122,72,232,0.45); }
.bl-pag .current { background: var(--purple); color: #fff; box-shadow: none; }

/* ---------- Artículo ---------- */
.ar { position: relative; z-index: 1; }
.ar-col { width: min(760px, calc(100% - 40px)); margin: 0 auto; }
.ar-head { display: flex; flex-direction: column; gap: 20px; padding: clamp(36px, 5vw, 80px) 0 clamp(28px, 3vw, 40px); }
.ar-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); }
.ar-crumbs a { color: var(--link); }
.ar-crumbs a:hover { color: var(--purple-dark); }
.ar-crumbs svg { width: 14px; height: 14px; color: rgb(170,164,190); }
.ar-title { font-weight: 600; font-size: clamp(32px, 4.4vw, 56px); line-height: 1.06; letter-spacing: -0.045em; color: var(--ink); text-wrap: balance; }
.ar-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); }

.ar-cover { width: min(1040px, calc(100% - 40px)); margin: 0 auto clamp(36px, 4vw, 56px); overflow: hidden; border-radius: 32px; aspect-ratio: 16 / 9; background: rgb(244,240,254); }
.ar-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Índice */
.ar-toc { margin: 0 0 40px; border-radius: 22px; background: var(--paper); box-shadow: inset 0 0 0 1px rgba(26,20,54,0.08); padding: 18px 22px; }
.ar-toc summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; cursor: pointer; font-weight: 600; font-size: 16px; color: var(--ink); }
.ar-toc summary::-webkit-details-marker { display: none; }
.ar-toc summary svg { width: 18px; height: 18px; color: var(--purple); transition: transform .3s var(--ease); }
.ar-toc[open] summary svg { transform: rotate(180deg); }
.ar-toc ol { display: grid; gap: 8px; margin: 14px 0 0; padding-left: 1.3em; }
.ar-toc li { font-size: 15px; line-height: 1.5; color: var(--muted); }
.ar-toc a { color: var(--link); }
.ar-toc a:hover { color: var(--purple-dark); }

/* Texto del artículo */
.ar-body { font-size: 17.5px; line-height: 1.75; color: var(--text); overflow-wrap: break-word; }
.ar-body > * + * { margin-top: 1.15em; }
.ar-body h2 { margin-top: 2.2em; font-weight: 600; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.15; letter-spacing: -0.035em; color: var(--ink); scroll-margin-top: 110px; }
.ar-body h3 { margin-top: 1.8em; font-weight: 600; font-size: clamp(19px, 1.6vw, 22px); line-height: 1.3; letter-spacing: -0.025em; color: var(--ink); scroll-margin-top: 110px; }
.ar-body h2 + *, .ar-body h3 + * { margin-top: 0.7em; }
.ar-body strong { font-weight: 600; color: var(--strong); }
.ar-body a { color: var(--purple); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(122,72,232,0.35); }
.ar-body a:hover { text-decoration-color: var(--purple); }
.ar-body ul, .ar-body ol { padding-left: 1.3em; }
.ar-body li + li { margin-top: 0.45em; }
.ar-body li::marker { color: var(--purple); }
.ar-body blockquote { margin-left: 0; margin-right: 0; border-left: 3px solid var(--purple); border-radius: 0 20px 20px 0; background: rgb(244,240,254); padding: 18px 24px; color: var(--ink); }
.ar-body blockquote p { margin: 0; }
.ar-body blockquote p + p { margin-top: 0.7em; }
.ar-body figure { margin-left: 0; margin-right: 0; }
.ar-body img { height: auto; border-radius: 20px; }
.ar-body figcaption { margin-top: 10px; font-size: 14px; text-align: center; color: var(--muted); }
.ar-body code { border-radius: 6px; background: rgb(244,240,254); padding: 2px 6px; font-size: 0.9em; color: var(--strong); }

/* Tablas: se desplazan de lado en el celular */
.ar-body .wp-block-table { overflow-x: auto; border-radius: 20px; background: var(--paper); box-shadow: inset 0 0 0 1px rgba(26,20,54,0.08); -webkit-overflow-scrolling: touch; }
.ar-body table { width: 100%; min-width: 540px; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.ar-body th { background: rgb(244,240,254); padding: 13px 16px; text-align: left; font-weight: 600; color: var(--ink); }
.ar-body td { border-top: 1px solid rgba(26,20,54,0.07); padding: 12px 16px; vertical-align: top; }
.ar-body .wp-block-table figcaption { padding: 0 16px 12px; }

/* Preguntas frecuentes de Rank Math */
.ar-body .rank-math-list { display: grid; gap: 12px; }
.ar-body .rank-math-list-item { border-radius: 20px; background: var(--paper); box-shadow: 0 14px 40px rgba(26,20,54,0.05); padding: 20px 24px; }
.ar-body .rank-math-question { margin: 0 0 8px; font-size: 18px; }
.ar-body .rank-math-answer p { margin: 0; }

/* Sigue leyendo */
.ar-mas { position: relative; z-index: 1; padding: clamp(70px, 8vw, 120px) 0; }
.ar-mas-title { margin-bottom: clamp(26px, 3vw, 40px); font-size: clamp(28px, 3.2vw, 44px); }
.ar-mas .bl-h { font-size: 18px; }

@media (max-width: 560px) {
  .ar-body { font-size: 16.5px; }
  .ar-cover { border-radius: 22px; }
  .ar-toc { padding: 16px 18px; }
}
