/*
Theme Name: SYLEGAL Blog
Theme URI: https://sylegalabogados.com/blog/
Author: Image Marketing
Author URI: https://paginasweb.imagemkt.com
Description: Tema ligero del blog de SYLEGAL Abogados & Psicólogos. Usa los estilos de la web principal para mantener el mismo diseño.
Version: 2.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: sylegal-blog
*/

/* Barra de categorías y búsqueda */
.blog-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px;margin-bottom:clamp(28px,4vw,44px)}
.blog-cats{display:flex;flex-wrap:wrap;gap:8px;min-width:0}
.blog-cats a{padding:10px 16px;border-radius:4px;background:var(--paper);color:var(--ink);font-weight:600;font-size:1rem;transition:background .3s,color .3s}
.blog-cats a:hover{color:var(--wine)}
.blog-cats a.is-active{background:var(--navy);color:#fff}
.blog-search{display:flex;align-items:center;border:1.5px solid var(--line);border-radius:4px;background:#fff;overflow:hidden}
.blog-search input{border:0;padding:12px 14px;font:500 1rem var(--f-body);color:var(--ink);min-width:220px;background:transparent}
.blog-search input:focus{outline:none}
.blog-search:focus-within{border-color:var(--blue);box-shadow:0 0 0 3px rgba(46,127,208,.15)}
.blog-search button{border:0;background:var(--navy);color:#fff;width:48px;height:48px;display:grid;place-items:center;cursor:pointer}
.blog-search svg{width:20px;height:20px}
.blog-list-title{margin-bottom:24px}

/* Tarjetas de artículos */
.post-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.post-card{display:flex;flex-direction:column;border-radius:6px;background:#fff;border:1px solid var(--line);overflow:hidden;transition:transform .5s var(--ease),box-shadow .5s var(--ease);min-width:0}
.post-card:hover{transform:translateY(-8px);box-shadow:0 30px 60px -28px rgba(14,28,74,.5)}
.post-card-media{display:block;aspect-ratio:16/9;overflow:hidden;background:linear-gradient(150deg,var(--navy),#16296A)}
.post-card-media img{width:100%;height:100%;object-fit:cover;transition:transform 1s var(--ease)}
.post-card:hover .post-card-media img{transform:scale(1.07)}
.post-card-ph{display:grid;place-items:center;height:100%;color:#C9A86A}
.post-card-ph svg{width:56px;height:56px}
.post-card-body{display:flex;flex-direction:column;flex:1;padding:24px}
.post-cat{align-self:flex-start;margin-bottom:12px;padding:5px 10px;border-radius:3px;background:var(--paper);color:var(--blue);font-weight:700;font-size:1rem}
.post-card-title{margin:0 0 10px}
.post-card-title a{color:var(--ink)}
.post-card-title a:hover{color:var(--wine)}
.post-card-body p{color:var(--muted);flex:1}
.post-card-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:16px;border-top:1px solid var(--line)}
.post-card-foot .post-read{color:var(--muted);font-size:1rem}
.post-card .svc2-btn{--c:var(--navy);margin:0;background:var(--navy);color:#fff;padding:10px 14px}
.post-card .svc2-btn:hover{background:#C9A86A;color:var(--navy)}
@media (max-width:1000px){.post-grid{grid-template-columns:1fr 1fr}}
@media (max-width:640px){.post-grid{grid-template-columns:1fr}.blog-search,.blog-search input{width:100%;min-width:0}}

/* Paginación */
.pager{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin-top:40px}
.pager .page-numbers{min-width:46px;height:46px;padding:0 14px;display:grid;place-items:center;border-radius:4px;background:var(--paper);color:var(--ink);font-weight:700}
.pager .page-numbers.current{background:var(--navy);color:#fff}
.pager a.page-numbers:hover{background:var(--wine);color:#fff}

/* Estado vacío */
.blog-empty{max-width:640px;margin-inline:auto;text-align:center;display:grid;gap:16px;justify-items:center}
.blog-empty p{color:var(--muted)}

/* Artículo */
.post-layout{display:grid;grid-template-columns:1fr 320px;gap:clamp(28px,4vw,56px);align-items:start}
.post-layout > *{min-width:0}
.post-cover{margin:0 0 32px;border-radius:6px;overflow:hidden}
.post-cover img{width:100%;height:auto}
.prose{font-size:1rem;line-height:1.8;color:var(--text)}
.prose--narrow{max-width:780px;margin-inline:auto}
.prose > * + *{margin-top:1.1em}
.prose h2{margin-top:1.8em;margin-bottom:.5em}
.prose h3{margin-top:1.5em;margin-bottom:.4em}
.prose a{color:var(--blue);text-decoration:underline;text-underline-offset:3px}
.prose a:hover{color:var(--wine)}
.prose ul,.prose ol{padding-left:1.3em;list-style:revert}
.prose li + li{margin-top:.4em}
.prose blockquote{margin:1.6em 0;padding:18px 22px;border-left:4px solid #C9A86A;background:var(--paper);border-radius:0 6px 6px 0;font-style:normal}
.prose img{border-radius:6px}
.prose table{width:100%;border-collapse:collapse;display:block;overflow-x:auto}
.prose th,.prose td{padding:10px 12px;border:1px solid var(--line);text-align:left}
.prose th{background:var(--paper)}
.post-author{display:flex;gap:18px;align-items:flex-start;margin-top:44px;padding:24px;border-radius:6px;background:var(--paper)}
.post-author img{width:56px;flex:none}
.post-author b{display:block;font-size:var(--fs-item);color:var(--ink);margin-bottom:4px}
.post-author p{margin:0;color:var(--muted)}
.post-side{position:sticky;top:calc(62px + 24px);display:grid;gap:16px}
.post-side-card{padding:24px;border-radius:6px;background:linear-gradient(150deg,var(--navy),#16296A);color:#DCE3F4}
.post-side-card .side-title{color:#C9A86A;margin:0 0 8px}
.post-side-card p{margin:0 0 18px}
.post-side-card .btn{width:100%}
.post-side-list{padding:22px;border-radius:6px;border:1px solid var(--line);display:grid;gap:4px}
.post-side-list .side-title{margin:0 0 8px}
.post-side-list a{display:block;padding:12px 0;border-top:1px solid var(--line);color:var(--ink)}
.post-side-list a:first-of-type{border-top:0}
.post-side-list a b{display:block;font-size:1rem;line-height:1.4}
.post-side-list a span{color:var(--muted);font-size:1rem}
.post-side-list a:hover b{color:var(--wine)}
@media (max-width:980px){.post-layout{grid-template-columns:1fr}.post-side{position:static}}

/* Artículo destacado */
.post-featured{display:grid;grid-template-columns:1.15fr .85fr;border-radius:6px;overflow:hidden;background:linear-gradient(130deg,var(--navy) 0%,#16296A 60%,#3A1F4E 100%);color:#DCE3F4;margin-bottom:clamp(40px,5vw,60px);box-shadow:0 40px 80px -35px rgba(14,28,74,.6);transition:transform .5s var(--ease)}
.post-featured:hover{transform:translateY(-6px)}
.post-featured-media{display:block;min-height:340px;overflow:hidden;background:#0B1640}
.post-featured-media img{width:100%;height:100%;object-fit:cover;transition:transform 1.2s var(--ease)}
.post-featured:hover .post-featured-media img{transform:scale(1.06)}
.post-featured-body{display:flex;flex-direction:column;justify-content:center;padding:clamp(28px,4vw,48px);min-width:0}
.post-tag-new{font-size:1rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#C9A86A;margin-bottom:14px}
.post-cat--gold{background:rgba(201,168,106,.18);color:#E8CF9C}
.post-featured-title{margin:0 0 14px}
.post-featured-title a{color:#fff}
.post-featured-title a:hover{color:#E8CF9C}
.post-featured-body p{color:#C8D1EA;margin-bottom:24px}
.post-featured-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px}
.post-featured-foot .post-read{color:#AEB8D6}
@media (max-width:900px){.post-featured{grid-template-columns:1fr}.post-featured-media{min-height:0;aspect-ratio:16/9}}

/* Cabecera interior: mismo bloque de texto que en las páginas de la web, para que la ruta quede a la misma altura */
.page-hero-copy{min-height:271px}
@media (min-width:761px){.page-hero-copy{min-height:202px}}
@media (min-width:981px){.page-hero-copy{min-height:257px}}
@media (min-width:1181px){.page-hero-copy{min-height:285px}}

/* Índice del artículo */
.post-toc{padding:22px;border-radius:6px;border:1px solid var(--line);background:#fff}
.post-toc .side-title{margin:0 0 10px}
.post-toc ol{margin:0;padding:0;list-style:none;counter-reset:toc;display:grid;gap:2px}
.post-toc li{counter-increment:toc}
.post-toc a{display:flex;gap:10px;padding:8px 10px;border-radius:4px;color:var(--text);font-size:1rem;line-height:1.4;transition:background .3s,color .3s}
.post-toc a::before{content:counter(toc,decimal-leading-zero);font-family:var(--f-display);color:#C9A86A;flex:none}
.post-toc a:hover{background:var(--paper);color:var(--wine)}
.post-toc a.is-active{background:var(--navy);color:#fff}
.prose h2{scroll-margin-top:calc(62px + 24px)}

/* La barra de administración de WordPress no debe tapar el menú fijo */
.admin-bar .site-header.fixed{top:32px}
@media (max-width:782px){.admin-bar .site-header.fixed{top:46px}}
