/* ==========================================================================
   Demo viva "rs-feed" (hero de /red-social): feed vertical de LinkLider Social.
   Markup: resources/views/web/partials/anim/rs-feed.blade.php
   Estados: data-liked (corazón + contador) · data-burst (DoubleTapHeart) · data-sheet (Comentarios)
            data-q / data-a (pregunta y respuesta) · data-post 1|2 (tarjeta visible) · data-cursor
   El feed social es oscuro siempre (como el real).
   ========================================================================== */

.lla-rs {
  --lla-bezel: #1d2129;
  --lla-bezel-edge: #3a404c;
  --lla-shadow: 0 32px 64px -24px rgba(22, 34, 58, .45), 0 10px 24px -10px rgba(22, 34, 58, .22);
  --lla-glow-a: rgba(236, 72, 153, .16);
  --lla-glow-b: rgba(55, 125, 255, .16);
  --lla-brand: #2d6a4f;
  --lla-cursor-fill: #ffffff;
  --lla-cursor-edge: #1e2022;
  --lla-cursor-ring: rgba(255, 255, 255, .6);
  max-width: 520px;
  margin-inline: auto;
  line-height: 1.3;
  text-align: left;
}
html[data-theme="dark"] .lla-rs { --lla-bezel-edge: #535b6a; --lla-shadow: 0 32px 64px -24px rgba(0, 0, 0, .8), 0 10px 24px -10px rgba(0, 0, 0, .55); }
.lla .lla-rs__stage { --lla-w: 560; --lla-h: 540; }
.lla-rs :where(b, small, strong, em, i, p) { margin: 0; font-size: inherit; font-style: normal; color: inherit; }
.lla-rs .bi::before { vertical-align: 0; }

.lla-rs__glow { position: absolute; border-radius: 50%; pointer-events: none; }
.lla-rs__glow--a { left: 30px; top: 20px; width: 380px; height: 380px; background: radial-gradient(closest-side, var(--lla-glow-a), transparent); }
.lla-rs__glow--b { left: 200px; top: 200px; width: 360px; height: 340px; background: radial-gradient(closest-side, var(--lla-glow-b), transparent); }

.lla-rs__phone { position: absolute; left: 150px; top: 6px; width: 260px; height: 528px; padding: 8px; border-radius: 40px; background: var(--lla-bezel); box-shadow: inset 0 0 0 1.5px var(--lla-bezel-edge), var(--lla-shadow); }
.lla-rs__screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 33px; background: #000; color: #fff; font-size: 11px; }
.lla-rs__notch { position: absolute; top: 8px; left: 50%; z-index: 9; width: 70px; height: 18px; border-radius: 999px; background: var(--lla-bezel); transform: translateX(-50%); }

.lla-rs__av { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--lla-brand); color: #fff; font-size: 10px; font-weight: 700; }
.lla-rs__av--xs { width: 20px; height: 20px; font-size: 7.5px; }
.lla-rs__av--m { background: #a855f7; }
.lla-rs__av--u { background: #0ea5e9; }

.lla-rs__chip { position: absolute; top: 34px; left: 10px; z-index: 6; display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 3px; border-radius: 999px; background: rgba(0, 0, 0, .45); font-size: 10px; font-weight: 600; backdrop-filter: blur(6px); }
.lla-rs__chip .bi { font-size: 8px; }
.lla-rs__bell { position: absolute; top: 34px; right: 12px; z-index: 6; font-size: 15px; }
.lla-rs__bell em { position: absolute; top: -4px; right: -7px; padding: 0 4px; border-radius: 999px; background: #ef4444; font-size: 8px; font-weight: 700; }

/* Tarjetas a pantalla completa (scroll-snap vertical) */
.lla-rs__track { position: absolute; inset: 0 0 46px; transition: transform .7s var(--lla-ease); }
.lla-rs[data-post="2"] .lla-rs__track { transform: translateY(-100%); }
.lla-rs__card { position: relative; height: 100%; overflow: hidden; }
.lla-rs__media { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 96px; color: rgba(255, 255, 255, .85); }
.lla-rs__media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .25), transparent 30%, transparent 50%, rgba(0, 0, 0, .75)); }
.lla-rs__media--1 { background: linear-gradient(160deg, #0f766e, #2d6a4f 50%, #052e16); animation: lla-rs-ken 9s ease-in-out infinite alternate; }
.lla-rs__media--2 { background: linear-gradient(160deg, #92400e, #b45309 50%, #451a03); }
.lla-rs__burst { position: absolute; z-index: 2; color: #fff; font-size: 92px; opacity: 0; transform: scale(.3); filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .4)); }
.lla-rs[data-burst] .lla-rs__burst { animation: lla-rs-burst .9s var(--lla-ease) both; }

.lla-rs__info { position: absolute; left: 10px; right: 58px; bottom: 12px; z-index: 2; display: flex; flex-direction: column; gap: 6px; }
.lla-rs__row { display: flex; align-items: center; gap: 5px; }
.lla-rs__row b { font-size: 11.5px; font-weight: 700; }
.lla-rs__ring { padding: 2px; border-radius: 50%; background: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7); }
.lla-rs__ring .lla-rs__av { width: 26px; height: 26px; border: 2px solid #000; }
.lla-rs__verified { color: #38bdf8; font-size: 10px; }
.lla-rs__follow { margin-left: 2px; padding: 2px 8px; border: 1px solid rgba(255, 255, 255, .6); border-radius: 999px; font-size: 9px; font-weight: 600; }
.lla-rs__msg { font-size: 12px; opacity: .9; }
.lla-rs__info p { font-size: 10.5px; line-height: 1.35; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.lla-rs__tag { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: #111827; font-size: 10px; font-weight: 700; }

.lla-rs__rail { position: absolute; right: 8px; bottom: 16px; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lla-rs__rail > span { display: flex; flex-direction: column; align-items: center; gap: 2px; transition: transform .15s var(--lla-ease); }
.lla-rs__rail .bi { font-size: 22px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)); }
.lla-rs__rail small { font-size: 8.5px; font-weight: 600; }
.lla-rs__rail > span.is-pressed { transform: scale(.88); }
.lla-rs__like .bi-heart-fill { display: none; color: #ef4444; }
.lla-rs[data-liked] .lla-rs__like .bi-heart { display: none; }
.lla-rs[data-liked] .lla-rs__like .bi-heart-fill { display: inline; animation: lla-rs-pop .4s var(--lla-ease); }

/* CommentSheet */
.lla-rs__overlay { position: absolute; inset: 0; z-index: 7; background: rgba(0, 0, 0, .35); opacity: 0; pointer-events: none; transition: opacity .3s var(--lla-ease); }
.lla-rs[data-sheet] .lla-rs__overlay { opacity: 1; }
.lla-rs__sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 8; display: flex; flex-direction: column; gap: 9px; height: 62%; padding: 12px 12px 14px; border-radius: 18px 18px 0 0; background: #fff; color: #111827; transform: translateY(105%); transition: transform .45s var(--lla-ease); }
.lla-rs[data-sheet] .lla-rs__sheet { transform: none; }
.lla-rs__sheet header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 6px; border-bottom: 1px solid #eef0f3; font-size: 12.5px; }
.lla-rs__sheet header .bi { color: #6b7280; font-size: 12px; transition: transform .15s var(--lla-ease); }
.lla-rs__sheet header .bi.is-pressed { transform: scale(.8); }
.lla-rs__c { display: flex; align-items: flex-start; gap: 7px; }
.lla-rs__c .lla-rs__av { width: 26px; height: 26px; font-size: 8.5px; }
.lla-rs__bubble { display: flex; flex-direction: column; gap: 1px; padding: 6px 9px; border-radius: 12px; background: #f3f4f6; font-size: 10.5px; }
.lla-rs__bubble b { display: flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 700; }
.lla-rs__c--q, .lla-rs__c--a { display: none; }
.lla-rs[data-q] .lla-rs__c--q, .lla-rs[data-a] .lla-rs__c--a { display: flex; animation: lla-rs-in .4s var(--lla-ease) both; }
.lla-rs__c--a { padding-left: 18px; }
.lla-rs__c--a .lla-rs__bubble { background: #ecfdf5; }
.lla-rs__write { display: flex; align-items: center; gap: 7px; margin-top: auto; padding: 6px 8px; border: 1px solid #e5e7eb; border-radius: 999px; color: #9ca3af; font-size: 10px; }
.lla-rs__write .bi { margin-left: auto; color: var(--lla-brand); }

/* BottomNav */
.lla-rs__nav { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; align-items: center; justify-content: space-around; height: 46px; padding-bottom: 4px; background: #000; border-top: 1px solid rgba(255, 255, 255, .1); }
.lla-rs__nav span { display: flex; flex-direction: column; align-items: center; gap: 1px; color: rgba(255, 255, 255, .6); font-size: 15px; }
.lla-rs__nav span.is-on { color: #fff; }
.lla-rs__nav small { font-size: 7.5px; }
.lla-rs__nav .lla-rs__plus { display: flex; align-items: center; justify-content: center; width: 34px; height: 24px; border-radius: 8px; background: #fff; color: #000; font-size: 15px; }

/* Puntero (dedo) */
.lla-rs__cursor { position: absolute; top: 0; left: 0; z-index: 10; width: 22px; height: 22px; pointer-events: none; opacity: 0; transform: translate(300px, 500px); transition: transform .6s var(--lla-ease), opacity .3s var(--lla-ease); }
.lla-rs[data-cursor] .lla-rs__cursor { opacity: 1; }
.lla-rs__cursor svg { position: relative; display: block; width: 22px; height: 22px; fill: var(--lla-cursor-fill); stroke: var(--lla-cursor-edge); stroke-width: 1.4; stroke-linejoin: round; }
.lla-rs__cursor-ring { position: absolute; left: -10px; top: -12px; width: 28px; height: 28px; border: 2px solid var(--lla-cursor-ring); border-radius: 50%; opacity: 0; }
.lla-rs__cursor.is-tap svg { animation: lla-rs-press .3s var(--lla-ease); }
.lla-rs__cursor.is-tap .lla-rs__cursor-ring { animation: lla-rs-ripple .5s var(--lla-ease); }

@container (max-width: 479px) {
  .lla .lla-rs__stage { --lla-w: 290; --lla-h: 540; }
  .lla-rs__phone { left: 15px; }
}

@keyframes lla-rs-ken { from { transform: scale(1); } to { transform: scale(1.08); } }
@keyframes lla-rs-burst { 0% { opacity: 0; transform: scale(.3); } 25% { opacity: 1; transform: scale(1.15); } 60% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.3) translateY(-30px); } }
@keyframes lla-rs-pop { 0% { transform: scale(.5); } 70% { transform: scale(1.25); } 100% { transform: none; } }
@keyframes lla-rs-in { from { transform: translateY(8px); } to { transform: none; } }
@keyframes lla-rs-press { 50% { transform: scale(.85); } }
@keyframes lla-rs-ripple {
  0% { opacity: .9; transform: scale(.4); }
  100% { opacity: 0; transform: scale(1.4); }
}
