/* ============================================================
   Villas del Pirulí — Blog
   Se carga DESPUÉS de style.css y reutiliza sus tokens.
   ============================================================ */

/* En el blog el header no monta sobre un hero: sin margen negativo */
.hdr--solid{margin-bottom:0;padding:1.6rem 0 0}

/* --- navegación del blog --- */
.bnav{background:var(--gray);border-bottom:1px solid var(--line)}
.bnav__in{
  width:min(100% - 3rem,var(--wrap));margin-inline:auto;
  display:flex;flex-wrap:wrap;gap:.4rem 1.6rem;align-items:center;
  min-height:54px;
}
.bnav a{
  text-decoration:none;font-weight:700;font-size:.95rem;color:var(--brown);
  padding:.4rem 0;border-bottom:2px solid transparent;
}
.bnav a:hover{color:var(--olive);border-bottom-color:var(--olive)}
.bnav a[aria-current="page"]{color:var(--olive);border-bottom-color:var(--olive)}

/* ============================================================
   CABECERA DEL ÍNDICE
   ============================================================ */
.bhero{background:var(--olive);color:#fff;padding:clamp(3rem,6vw,5rem) 0;text-align:center}
.bhero__eyebrow{margin:0 0 .6rem;opacity:.8;font-size:1rem}
.bhero h1{font-size:clamp(2.2rem,5vw,3.6rem);margin:0 0 1rem;text-wrap:balance}
.bhero p{margin:0 auto;max-width:70ch;opacity:.92;font-size:1.05rem}

/* ============================================================
   REJILLA DE ARTÍCULOS
   ============================================================ */
.posts{padding:clamp(3rem,6vw,5rem) 0}
.posts__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:2rem}

.post{
  display:flex;flex-direction:column;
  background:#fff;border:1px solid var(--line);border-radius:var(--radius);
  overflow:hidden;
  transition:transform .2s ease,box-shadow .2s ease;
}
.post:hover{transform:translateY(-5px);box-shadow:0 16px 38px rgba(0,0,0,.14)}
.post__img{display:block;aspect-ratio:16/9;overflow:hidden;background:var(--gray)}
.post__img img{width:100%;height:100%;object-fit:cover;transition:transform .45s ease}
.post:hover .post__img img{transform:scale(1.05)}
.post__body{padding:1.6rem 1.5rem 1.8rem;display:flex;flex-direction:column;flex:1}
.post__tag{
  align-self:flex-start;background:var(--gray);color:var(--olive);
  font-size:.78rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;
  padding:.3rem .7rem;border-radius:99px;margin-bottom:.9rem;
}
.post__h{font-size:1.32rem;line-height:1.22;margin:0 0 .8rem}
.post__h a{text-decoration:none}
.post__h a:hover{color:var(--olive)}
.post__ex{margin:0 0 1.4rem;color:var(--muted);font-size:.97rem;flex:1}
.post__meta{
  display:flex;align-items:center;justify-content:space-between;gap:1rem;
  font-size:.86rem;color:var(--muted);border-top:1px solid var(--line);padding-top:1rem;
}
.post__more{color:var(--olive);font-weight:700;text-decoration:none}
.post__more:hover{text-decoration:underline}

/* destacado: la primera nota ocupa el ancho completo */
.post--lead{grid-column:1 / -1;flex-direction:row;align-items:stretch}
.post--lead .post__img{flex:0 0 52%;aspect-ratio:auto}
.post--lead .post__body{padding:clamp(1.8rem,3.5vw,3rem)}
.post--lead .post__h{font-size:clamp(1.6rem,3vw,2.4rem)}
.post--lead .post__ex{font-size:1.05rem}

/* ============================================================
   ARTÍCULO
   ============================================================ */
.art{padding:clamp(2.5rem,5vw,4rem) 0 clamp(3rem,6vw,5rem)}
.art__wrap{width:min(100% - 3rem,860px);margin-inline:auto}

.crumbs{font-size:.88rem;color:var(--muted);margin:0 0 1.4rem}
.crumbs a{color:var(--muted);text-decoration:none}
.crumbs a:hover{color:var(--olive);text-decoration:underline}
.crumbs span{opacity:.5;margin:0 .4rem}

.art__tag{
  display:inline-block;background:var(--olive);color:#fff;
  font-size:.78rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;
  padding:.35rem .8rem;border-radius:99px;margin-bottom:1.1rem;
}
.art__h1{font-size:clamp(2rem,4.4vw,3.1rem);margin:0 0 1.1rem;text-wrap:balance}
.art__sub{font-size:1.15rem;color:var(--muted);margin:0 0 1.4rem}
.art__meta{
  display:flex;flex-wrap:wrap;gap:.5rem 1.4rem;align-items:center;
  font-size:.9rem;color:var(--muted);
  border-top:1px solid var(--line);border-bottom:1px solid var(--line);
  padding:.9rem 0;margin:0 0 2rem;
}
.art__cover{border-radius:var(--radius);overflow:hidden;margin:0 0 2.4rem}
.art__cover img{width:100%;aspect-ratio:16/9;object-fit:cover}
.art__cover figcaption{
  font-size:.85rem;color:var(--muted);padding:.7rem .2rem 0;text-align:center;
}

/* --- índice de contenido --- */
.toc{
  background:var(--gray);border-left:4px solid var(--olive);
  border-radius:0 var(--radius) var(--radius) 0;
  padding:1.5rem 1.8rem;margin:0 0 2.6rem;
}
.toc h2{font-size:1.1rem;margin:0 0 .9rem;color:var(--olive)}
/* sin numeración automática: algunos artículos ya numeran sus propios H2 */
.toc ol{margin:0;padding:0;list-style:none;display:grid;gap:.45rem}
.toc li{position:relative;padding-left:1.1rem}
.toc li::before{
  content:'';position:absolute;left:0;top:.62em;
  width:.5rem;height:2px;background:var(--olive-soft);
}
.toc a{color:var(--txt);text-decoration:none;font-size:.97rem}
.toc a:hover{color:var(--olive);text-decoration:underline}

/* --- cuerpo --- */
.prose{font-size:1.06rem;line-height:1.75}
.prose > * + *{margin-top:1.15rem}
.prose h2{
  font-size:clamp(1.6rem,3vw,2.1rem);color:var(--olive);
  margin-top:2.8rem;padding-top:.4rem;scroll-margin-top:1.5rem;
}
.prose h3{font-size:clamp(1.2rem,2.2vw,1.45rem);margin-top:2rem;scroll-margin-top:1.5rem}
.prose p{margin-bottom:0}
.prose a{color:var(--olive);font-weight:700;text-decoration:underline;text-underline-offset:2px}
.prose a:hover{color:var(--brown)}
.prose ul,.prose ol{padding-left:1.3rem;display:grid;gap:.55rem}
.prose li{line-height:1.65}
.prose li::marker{color:var(--olive-soft)}
.prose strong{font-weight:700}
.prose img{border-radius:var(--radius);margin-inline:auto}
.prose blockquote{
  margin:2rem 0;padding:1.2rem 1.6rem;
  background:var(--gray);border-left:4px solid var(--sage);
  border-radius:0 var(--radius) var(--radius) 0;
  font-size:1.05rem;color:var(--brown);
}
.prose blockquote p{margin:0}

/* tablas */
.tablewrap{overflow-x:auto;margin:1.8rem 0}
.prose table{border-collapse:collapse;width:100%;min-width:520px;font-size:.97rem}
.prose th,.prose td{border:1px solid var(--line);padding:.8rem .9rem;text-align:left;vertical-align:top}
.prose thead th{background:var(--olive);color:#fff;font-weight:700}
.prose tbody tr:nth-child(even){background:var(--gray)}

/* aviso / nota */
.note{
  background:#FBFBF6;border:1px solid var(--line);border-left:4px solid var(--olive-soft);
  border-radius:0 var(--radius) var(--radius) 0;
  padding:1.2rem 1.5rem;font-size:.97rem;color:var(--muted);
}
.note strong{color:var(--brown)}

/* --- FAQs --- */
.faq{margin-top:1.4rem;display:grid;gap:.8rem}
.faq details{
  border:1px solid var(--line);border-radius:var(--radius);
  background:#fff;overflow:hidden;
}
.faq summary{
  cursor:pointer;list-style:none;
  padding:1.1rem 3rem 1.1rem 1.3rem;position:relative;
  font-weight:700;font-size:1.05rem;line-height:1.35;
}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{
  content:'';position:absolute;right:1.2rem;top:1.35rem;
  width:14px;height:14px;background:var(--olive);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23000' stroke-width='2.4'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23000' stroke-width='2.4'/%3E%3C/svg%3E") center/contain no-repeat;
  transition:transform .22s ease;
}
.faq details[open] summary::after{transform:rotate(180deg)}
.faq summary:hover{background:var(--gray)}
.faq__a{padding:0 1.3rem 1.3rem;color:var(--muted)}
.faq__a p{margin:0 0 .8rem}
.faq__a p:last-child{margin:0}
.faq__a a{color:var(--olive);font-weight:700}

/* --- CTA dentro del artículo --- */
.cta{
  background:var(--olive);color:#fff;border-radius:var(--radius);
  padding:clamp(1.8rem,4vw,2.8rem);margin:3rem 0 0;text-align:center;
}
.cta h2{color:#fff;font-size:clamp(1.5rem,3vw,2.1rem);margin:0 0 .8rem}
.cta p{margin:0 auto 1.6rem;max-width:56ch;opacity:.92}
.cta__btns{display:flex;gap:1rem;justify-content:center;flex-wrap:wrap}
.cta .btn--wa{background:#25D366;color:#fff}
.cta .btn--white{background:#fff;color:var(--olive)}

/* --- compartir --- */
.share{display:flex;align-items:center;gap:.9rem;flex-wrap:wrap;margin-top:2.5rem;font-size:.92rem;color:var(--muted)}
.share a{
  width:40px;height:40px;border-radius:50%;border:1px solid var(--line);
  display:grid;place-items:center;color:var(--brown);
  transition:background .2s ease,color .2s ease;
}
.share a:hover{background:var(--olive);color:#fff;border-color:var(--olive)}

/* --- relacionados --- */
.rel{background:var(--gray);padding:clamp(3rem,6vw,4.5rem) 0}
.rel__h{font-size:clamp(1.7rem,3.4vw,2.4rem);margin:0 0 2rem;text-align:center}
.rel .posts__grid{grid-template-columns:repeat(3,1fr)}

/* ============================================================
   TIRA "DEL BLOG" EN EL HOME
   ============================================================ */
.homeblog{padding:clamp(3rem,6vw,5rem) 0;background:var(--gray)}
.homeblog__head{
  display:flex;align-items:flex-end;justify-content:space-between;gap:1.5rem;
  flex-wrap:wrap;margin-bottom:2rem;
}
.homeblog__h2{font-size:clamp(2rem,4vw,3rem);margin:0}
.homeblog__all{color:var(--olive);font-weight:700;text-decoration:none;white-space:nowrap}
.homeblog__all:hover{text-decoration:underline}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width:1080px){
  .posts__grid,.rel .posts__grid{grid-template-columns:1fr 1fr}
}
@media (max-width:900px){
  .post--lead{flex-direction:column}
  .post--lead .post__img{flex:none;aspect-ratio:16/9}
}
@media (max-width:640px){
  .bnav__in{width:min(100% - 2rem,var(--wrap));gap:.2rem 1.1rem}
  .art__wrap{width:min(100% - 2rem,860px)}
  .posts__grid,.rel .posts__grid{grid-template-columns:1fr}
  .prose{font-size:1.02rem}
  .cta .btn{width:100%}
}
