/* Quadros vivos da home (30/10/2026): a Inspiração Católica, os Mais Lidos e o Ler e rezar.
   Continuam os mesmos pergaminhos de moldura dupla e cantoneiras de ouro, com
   as mesmas letras. O que muda: o quadro flutua e inclina-se com o rato; uma
   moldura pairando mostra a imagem da entrada da vez; as entradas passam
   sozinhas, abrindo o resumo, com um fio de ouro a encher-se até à seguinte.
   O JS (js/quadro-vivo.js) só acrescenta .qv-viva quando monta tudo. */

/* ── comum ── */
html body .qv-viva{z-index:1;animation:qvFlutua 9s ease-in-out infinite;
  background-image:radial-gradient(420px circle at var(--mx,-600px) var(--my,-600px),rgba(214,172,74,.17),transparent 65%);
  transition:opacity .8s cubic-bezier(.16,1,.3,1),transform .6s cubic-bezier(.2,.7,.2,1),background-color .3s}
html body .qv-viva:not(.reveal),html body .qv-viva.reveal.visible{transform:perspective(1400px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg))}
@keyframes qvFlutua{0%,100%{translate:0 0}50%{translate:0 -7px}}
/* a sombra no chão, que encolhe quando o quadro sobe */
html body .qv-sombra{position:absolute;left:12%;right:12%;bottom:-26px;height:34px;z-index:0;pointer-events:none;border-radius:50%;
  background:radial-gradient(closest-side,rgba(40,24,8,.28),transparent);filter:blur(6px);animation:qvSombra 9s ease-in-out infinite}
@keyframes qvSombra{0%,100%{transform:scaleX(1);opacity:1}50%{transform:scaleX(.9);opacity:.62}}
/* uma luz de vela que passeia pelo pergaminho */
html body .qv-viva::before{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:0;
  background:radial-gradient(60% 90% at 50% 50%,rgba(232,196,110,.16),transparent 70%) no-repeat;background-size:70% 160%;
  animation:qvLuz 16s ease-in-out infinite alternate}
@keyframes qvLuz{0%{background-position:-10% 30%}50%{background-position:60% 70%}100%{background-position:110% 20%}}

/* a moldura que paira */
html body .qv-frame{position:relative;display:block;border-radius:6px;overflow:hidden;background:#2a1f15;text-decoration:none;
  box-shadow:0 30px 46px -26px rgba(40,24,8,.62),0 0 0 1px rgba(168,134,47,.55),0 0 0 5px rgba(255,252,245,.9),0 0 0 6px rgba(168,134,47,.3);
  animation:qvMoldura 7.5s ease-in-out infinite;transform:translate(var(--fx,0px),var(--fy,0px));transition:transform .6s cubic-bezier(.2,.7,.2,1),box-shadow .4s}
@keyframes qvMoldura{0%,100%{translate:0 0;rotate:-1.1deg}50%{translate:0 -10px;rotate:.5deg}}
html body .qv-frame:hover{box-shadow:0 38px 54px -26px rgba(40,24,8,.7),0 0 0 1px rgba(168,134,47,.8),0 0 0 5px rgba(255,252,245,.95),0 0 0 6px rgba(168,134,47,.5),0 0 44px -8px rgba(201,162,39,.45)}
html body .qv-frame img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;scale:1.09;transition:opacity 1.1s ease,scale 8s linear}
html body .qv-frame img{object-fit:contain!important;object-position:50% 50%!important;z-index:1}
html body .qv-frame img.qv-cont{object-fit:contain}
/* a mesma pintura, desfocada, por trás: a imagem aparece inteira e a moldura não fica com faixas */
html body .qv-fundo{position:absolute;inset:-24px;z-index:0;background:#2a1f15 50% 50%/cover no-repeat;
  filter:blur(16px) brightness(.74) saturate(1.15);transition:background-image .9s ease}
html body .qv-frame img.qv-sem{background:radial-gradient(circle at 50% 40%,#4a3722,#1d1610)}
html body .qv-frame img.on{opacity:1;scale:1}
html body .qv-frame::before{content:"";position:absolute;inset:0;z-index:2;pointer-events:none;
  background:linear-gradient(180deg,rgba(21,16,12,.32),rgba(21,16,12,0) 30%,rgba(21,16,12,0) 62%,rgba(21,16,12,.55))}
html body .qv-frame::after{content:"";position:absolute;inset:7px;z-index:2;pointer-events:none;border:1px solid rgba(246,238,219,.42);border-radius:3px}
html body .qv-frame-n{position:absolute;right:.9rem;top:.7rem;z-index:3;font-family:var(--ff-heading);font-size:.7rem;letter-spacing:.2em;color:#f6eedb;
  text-shadow:0 1px 6px rgba(0,0,0,.6)}
html body .qv-frame-n i{font-style:normal;opacity:.6;margin:0 .15em}
html body .qv-frame-m{position:absolute;left:.85rem;bottom:.75rem;z-index:3;padding:.28rem .62rem;border-radius:999px;font-family:var(--ff-heading);
  font-size:.6rem;letter-spacing:.16em;text-transform:uppercase;color:#2a1f15;background:rgba(246,238,219,.9);
  -webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);box-shadow:0 4px 12px -6px rgba(0,0,0,.45)}

/* as entradas: chegam em cascata; a da vez abre o resumo; o fio enche-se */
html body .qv-viva .qv-row{opacity:0;translate:26px 0}
html body .qv-viva.qv-entrou .qv-row{opacity:1;translate:0 0;transition:opacity .7s ease calc(var(--i,0)*90ms),translate .8s cubic-bezier(.2,.7,.2,1) calc(var(--i,0)*90ms),background .45s}
html body .qv-x{display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows .6s cubic-bezier(.2,.7,.2,1),opacity .5s}
html body .qv-x>span{overflow:hidden;min-height:0}
html body .qv-x>span>span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;padding-top:.35rem;
  font-family:var(--ff-body);font-style:italic;font-size:.9rem;line-height:1.5;color:var(--pg-ink2,#5a4e44);text-wrap:pretty;
  text-transform:none;letter-spacing:0;font-weight:400}
html body .qv-row.on .qv-x{grid-template-rows:1fr;opacity:1}
html body .qv-fio{position:absolute;bottom:-1px;height:1px;z-index:2;background:linear-gradient(90deg,#b8892a,#d9b65c);
  transform-origin:left;transform:scaleX(0);pointer-events:none}
html body .qv-row.on .qv-fio{animation:qvFio var(--dur,7s) linear forwards}
html body .qv-pausa .qv-row.on .qv-fio{animation-play-state:paused}
@keyframes qvFio{to{transform:scaleX(1)}}

/* ── Inspiração Católica ── */
html body .qv-ci .ci-head,html body .qv-ci .ci-list{position:relative;z-index:1}
html body .qv-ci .qv-frame{margin-top:1.7rem;width:min(100%,360px);aspect-ratio:16/10}
html body .qv-ci .ci-list li{position:relative}
html body .qv-ci .ci-list a{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:1rem;align-items:baseline;
  padding:.85rem .9rem .85rem 1.15rem;border-radius:10px;transition:background .45s,transform .45s cubic-bezier(.2,.7,.2,1)}
html body .qv-ci .ci-list a::before{content:"";position:absolute;left:.2rem;top:.95rem;bottom:.95rem;width:2px;border-radius:2px;background:#b8892a;
  transform:scaleY(0);transition:transform .5s cubic-bezier(.2,.7,.2,1)}
html body .qv-ci .ci-list li.on a{background:rgba(201,162,39,.085);transform:translateX(4px)}
html body .qv-ci .ci-list li.on a::before{transform:scaleY(1)}
html body .qv-ci .ci-list li.on .ci-item-t{color:#3d2c17}
html body .qv-ci .qv-x{grid-column:1/-1}
html body .qv-ci .qv-fio{left:1.15rem;right:.9rem}

/* ── Os Mais Lidos: a moldura à esquerda, os dez à direita ── */
html body .qv-mr{grid-template-columns:minmax(0,5fr) minmax(0,7fr);overflow:visible;isolation:isolate}
html body .qv-mr>*{position:relative;z-index:1}
html body .qv-mr-lado{grid-column:1;grid-row:1/span 10;padding:clamp(1.6rem,3vw,2.6rem);border-right:1px solid rgba(168,134,47,.22)}
html body .qv-mr .qv-frame{position:sticky;top:calc(var(--header-h,72px) + 2rem);width:100%;aspect-ratio:4/5;max-height:560px}
html body .qv-mr .qv-frame-n{left:1rem;right:auto;top:.75rem;font-family:var(--ff-body);font-style:italic;font-size:2.5rem;letter-spacing:0;line-height:1;color:#f6eedb}
html body .qv-mr .qv-frame-n small{font-size:.42em;font-style:normal;font-family:var(--ff-heading);letter-spacing:.1em;margin-right:.18em;vertical-align:.9em;opacity:.85}
html body .qv-mr .most-read-item{grid-column:2!important;border-right:0!important;border-bottom:1px solid rgba(168,134,47,.2)!important;
  padding:.8rem clamp(1rem,2.4vw,1.8rem) .8rem clamp(1rem,2vw,1.5rem);align-items:center;position:relative;
  transition:background .45s}
html body .qv-mr .most-read-item:last-child{border-bottom:0!important}
html body .qv-mr .most-read-item::before{content:"";position:absolute;left:0;top:.8rem;bottom:.8rem;width:2px;border-radius:2px;background:#b8892a;
  transform:scaleY(0);transition:transform .5s cubic-bezier(.2,.7,.2,1)}
html body .qv-mr .most-read-rank{width:38px;height:38px;font-size:1rem;transition:background .45s,color .45s}
html body .qv-mr .most-read-tag{margin-bottom:.15rem}
html body .qv-mr .most-read-title{font-size:1rem;margin-bottom:.2rem}
html body .qv-mr .most-read-item.on{background:rgba(201,162,39,.085)}
html body .qv-mr .most-read-item.on::before{transform:scaleY(1)}
html body .qv-mr .most-read-item.on .most-read-rank{background:#2a1f15;color:#f1d98f}
html body .qv-mr .most-read-item.on .most-read-arrow{transform:translateX(4px);color:#8b6508}
html body .qv-mr .qv-fio{left:clamp(1rem,2vw,1.5rem);right:clamp(1rem,2.4vw,1.8rem)}

/* ── Ler e rezar: a moldura sob as pílulas, as entradas abrem a primeira linha da oração ── */
html body .qv-hl{position:relative}
html body .qv-hl>*{position:relative;z-index:1}
html body #hl .hl-head .qv-frame{margin-top:1.5rem;width:100%;aspect-ratio:4/3}
html body .qv-hl .hl-list li{position:relative}
html body .qv-hl .hl-list a{position:relative;padding:.85rem .8rem .85rem 1rem;border-radius:10px;transition:background .45s,transform .45s cubic-bezier(.2,.7,.2,1)}
html body .qv-hl .hl-list a::before{content:"";position:absolute;left:.15rem;top:.9rem;bottom:.9rem;width:2px;border-radius:2px;background:#b8892a;
  transform:scaleY(0);transition:transform .5s cubic-bezier(.2,.7,.2,1)}
html body .qv-hl .hl-list li.on a{background:rgba(201,162,39,.085);transform:translateX(3px)}
html body .qv-hl .hl-list li.on a::before{transform:scaleY(1)}
html body .qv-hl .hl-list li.on .hl-t{color:#3d2c17}
html body .qv-hl .qv-fio{left:1rem;right:.8rem}
html body .qv-hl .qv-x>span>span{font-size:.86rem}
@media (min-width:880px){html body #hl .hl-in>.qv-sombra{left:calc(290px + 3.2rem + 6%);right:6%}}
@media (max-width:879px){html body #hl .hl-head .qv-frame{aspect-ratio:16/9;margin-top:1.2rem}}

@media (min-width:821px){html body .qv-ci{align-items:center}}
@media (max-width:820px){
  html body .qv-ci .ci-list a{grid-template-columns:minmax(0,1fr);row-gap:.15rem;padding:.8rem .7rem .8rem 1rem}
  html body .qv-ci .qv-frame{width:100%;aspect-ratio:16/9;margin-top:1.3rem}
  html body .qv-mr{grid-template-columns:minmax(0,1fr)}
  html body .qv-mr-lado{grid-column:1;grid-row:auto;border-right:0;border-bottom:1px solid rgba(168,134,47,.22);padding:1.4rem 1.2rem 1.6rem}
  html body .qv-mr .qv-frame{position:relative;top:auto;aspect-ratio:16/10;max-height:none}
  html body .qv-mr .qv-frame-n{font-size:2rem}
  html body .qv-mr .most-read-item{grid-column:1!important;gap:1rem}
  html body .qv-sombra{bottom:-18px}
}
@media (prefers-reduced-motion:reduce){
  html body .qv-viva,html body .qv-sombra,html body .qv-frame,html body .qv-viva::before{animation:none}
  html body .qv-frame img{transition:opacity .4s;scale:1}
  html body .qv-viva .qv-row{opacity:1;translate:0 0}
  html body .qv-fio{display:none}
}
/* os cantos redondos, agora que o quadro não corta (overflow visível, para a moldura ficar presa ao rolar) */
@media (min-width:821px){
  html body .qv-mr-lado{border-radius:14px 0 0 14px}
  html body .qv-mr .qv-mr-lado+.most-read-item{border-top-right-radius:14px}
  html body .qv-mr .most-read-item:last-child{border-bottom-right-radius:14px}
}
@media (max-width:820px){html body .qv-mr .most-read-item:last-child{border-radius:0 0 14px 14px}}
