/* ==========================================================
   Fuego Dulce · Muro de historias (widget fd-historias)
   ========================================================== */
@font-face {
	font-family: 'FD Cookies';
	src: url('fonts/Cookies.ttf') format('truetype');
	font-display: swap;
}

.fdhs {
	--hs-brand: #c60342; --hs-ink: #26101b; --hs-ink-2: #6b5560; --hs-line: #f3e3e8; --hs-yellow: #ffd84a;
	--hs-spring: cubic-bezier(0.34, 1.56, 0.64, 1); --hs-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--hs-ig: linear-gradient(45deg, #feda75, #fa7e1e, #d62976, #962fbf);
	position: relative; box-sizing: border-box; padding: clamp(56px, 7vw, 100px) 0 clamp(56px, 7vw, 90px); overflow: hidden;
	color: var(--hs-ink); font-family: 'DM Sans', system-ui, sans-serif; isolation: isolate;
}
/* El visor se mueve al <body> para que nada lo recorte: repite las variables */
.fdhs-viewer {
	--hs-ink: #26101b; --hs-spring: cubic-bezier(0.34, 1.56, 0.64, 1); --hs-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--hs-ig: linear-gradient(45deg, #feda75, #fa7e1e, #d62976, #962fbf);
	font-family: 'DM Sans', system-ui, sans-serif;
}
.fdhs *, .fdhs *::before, .fdhs *::after, .fdhs-viewer *, .fdhs-viewer *::before, .fdhs-viewer *::after { box-sizing: border-box; }
.fdhs img, .fdhs video { max-width: none; }
.fdhs-fun { font-family: 'FD Cookies', 'Bricolage Grotesque', sans-serif !important; font-weight: 400 !important; letter-spacing: 0.01em; }
.fdhs .fdb-acc { position: relative; display: inline-block; }
.fdhs .fdb-acc::after { content: ''; position: absolute; left: 50%; top: -0.08em; width: 0.16em; height: 0.3em; border-radius: 0.1em; background: currentColor; transform: translateX(-30%) rotate(28deg); }
.fdhs .fdb-acc--i::after { top: -0.2em; height: 0.26em; }
.fdhs .fdb-acc--n::after { content: '~'; width: auto; height: auto; top: -0.42em; background: none; transform: translateX(-50%) scaleX(1.3); font: 700 0.75em/1 'DM Sans', sans-serif; }

/* Encabezado */
.fdhs__head { position: relative; z-index: 2; padding: 0 20px; text-align: center; }
.fdhs-sticker { display: inline-block; padding: 9px 16px 7px; border-radius: 999px; background: var(--hs-brand); color: #fff; font-size: 1.15rem; line-height: 1; transform: rotate(-4deg); }
.fdhs .fdhs-h2 { margin: 14px 0 0; color: var(--hs-ink); font: 400 clamp(2.6rem, 2rem + 3.6vw, 5.4rem)/0.92 'Anton', sans-serif; text-transform: uppercase; letter-spacing: 0.005em; }
.fdhs .fdhs-h2 em { font-style: normal; color: var(--hs-brand); }
.fdhs-p { max-width: 46ch; margin: 14px auto 0; color: var(--hs-ink-2); font-size: 18px; line-height: 1.5; }
.fdhs-empty { margin: 30px 20px; padding: 24px; border: 2px dashed var(--hs-line); border-radius: 20px; text-align: center; color: var(--hs-ink-2); }

/* Gomitas flotando */
.fdhs-g { position: absolute; z-index: 1; width: clamp(60px, 7vw, 96px); height: auto; pointer-events: none; filter: drop-shadow(0 10px 10px rgba(38, 16, 27, 0.3)); animation: fdhs-float 6s ease-in-out infinite; }
.fdhs-g--0 { left: 3%; top: 90px; }
.fdhs-g--1 { right: 4%; top: 40px; animation-delay: -2s; }
@keyframes fdhs-float { 50% { transform: translateY(-14px) rotate(8deg); } }

/* Personajitos tipo sticker */
.fdhs-pj { position: absolute; z-index: 3; width: clamp(110px, 11vw, 190px); height: auto; filter: drop-shadow(0 12px 14px rgba(38, 16, 27, 0.28)); animation: fdhs-pj 5s ease-in-out infinite; pointer-events: none; }
.fdhs-pj--0 { left: 4%; top: 40px; rotate: -10deg; }
.fdhs-pj--1 { right: 4%; top: 18px; rotate: 9deg; animation-delay: -1.6s; }
.fdhs-pj--2 { left: 6%; bottom: 60px; rotate: 6deg; animation-delay: -3.2s; }
.fdhs-pj--3 { right: 6%; bottom: 70px; rotate: -7deg; animation-delay: -2.4s; }
@keyframes fdhs-pj { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-10px) rotate(4deg); } }

/* Fila de historias: pasa sola y se detiene al pasar el mouse */
.fdhs__track { margin-top: 40px; padding: 20px 0 30px; overflow: hidden; }
.fdhs__row { display: flex; width: max-content; gap: 20px; padding: 0 20px; }
.fdhs.is-moving .fdhs__row { animation: fdhs-scroll var(--hs-dur, 60s) linear infinite; }
.fdhs.is-paused .fdhs__row, .fdhs__track:hover .fdhs__row, .fdhs__track:focus-within .fdhs__row { animation-play-state: paused; }
@keyframes fdhs-scroll { to { transform: translateX(-50%); } }
.fdhs.is-centered .fdhs__row { margin: 0 auto; }

.fdhs .fdhs-st {
	position: relative; flex: none; width: 210px; aspect-ratio: 9 / 16; margin: 0; padding: 0; border: 0; border-radius: 22px; overflow: hidden;
	background: var(--hs-ink); color: #fff; text-align: left; font: inherit; text-transform: none; letter-spacing: 0; cursor: pointer;
	box-shadow: 0 22px 40px -22px rgba(38, 16, 27, 0.55); transition: transform 0.45s var(--hs-spring), box-shadow 0.3s;
}
.fdhs .fdhs-st:nth-child(odd) { transform: rotate(-2deg); }
.fdhs .fdhs-st:nth-child(even) { transform: rotate(2deg) translateY(14px); }
.fdhs .fdhs-st:hover, .fdhs .fdhs-st:focus-visible { transform: rotate(0) translateY(-8px) scale(1.06); z-index: 3; outline: none; background: var(--hs-ink); box-shadow: 0 0 0 3px var(--hs-brand), 0 30px 50px -24px rgba(38, 16, 27, 0.6); }
.fdhs-st > img, .fdhs-st > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 6s linear; }
.fdhs-st:hover > img, .fdhs-st:hover > video { transform: scale(1.12); }
.fdhs-st::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(0, 0, 0, 0.45), transparent 26%, transparent 65%, rgba(0, 0, 0, 0.35)); pointer-events: none; }
.fdhs-st__bars { position: absolute; z-index: 2; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; }
.fdhs-st__bars i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.45); }
.fdhs-st__bars i:first-child { background: #fff; }
.fdhs-st__top { position: absolute; z-index: 2; top: 22px; left: 10px; right: 10px; display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; line-height: 1.2; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); white-space: nowrap; overflow: hidden; }
.fdhs-st__top small { font-weight: 500; opacity: 0.85; }
.fdhs-av { flex: none; display: grid; place-items: center; width: 30px; height: 30px; padding: 2px; border-radius: 50%; background: var(--hs-ig); }
.fdhs-av span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; border: 2px solid #fff; background: #fff; color: var(--hs-ink); font-size: 11px; font-weight: 800; text-shadow: none; }
.fdhs-st__play { position: absolute; z-index: 2; left: 50%; top: 50%; width: 52px; height: 52px; translate: -50% -50%; scale: 0.7; border-radius: 50%; background: rgba(255, 255, 255, 0.28); backdrop-filter: blur(6px); display: grid; place-items: center; opacity: 0; transition: opacity 0.25s, scale 0.3s var(--hs-spring); }
.fdhs-st:hover .fdhs-st__play, .fdhs-st:focus-visible .fdhs-st__play { opacity: 1; scale: 1; }
.fdhs-st__play::before { content: ''; margin-left: 4px; border-left: 16px solid #fff; border-top: 10px solid transparent; border-bottom: 10px solid transparent; }

/* Stickers tipo Instagram */
.fdhs-stk { position: absolute; z-index: 2; left: 50%; translate: -50% 0; width: max-content; max-width: 86%; text-align: center; overflow-wrap: anywhere; pointer-events: none; }
.fdhs-stk--text { padding: 6px 12px; border-radius: 8px; background: #fff; color: var(--hs-ink); font: 800 15px/1.1 'DM Sans', sans-serif; }
.fdhs-stk--emoji { font-size: 34px; line-height: 1; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.3)); }
.fdhs-stk--mention { padding: 6px 12px; border-radius: 8px; background: linear-gradient(90deg, #f58529, #dd2a7b, #8134af); color: #fff; font: 800 13px/1.1 'DM Sans', sans-serif; text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap; overflow-wrap: normal; }

/* Invitación a etiquetarnos */
.fdhs__cta { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 14px; width: fit-content; max-width: calc(100% - 40px); margin: 26px auto 0; padding: 12px 22px 12px 12px; border-radius: 999px; background: #fff; box-shadow: 0 0 0 1.5px var(--hs-line), 0 12px 26px -16px rgba(38, 16, 27, 0.35); }
.fdhs__cta p { margin: 0; font-size: 15px; line-height: 1.35; color: var(--hs-ink); }
.fdhs__cta a { color: var(--hs-brand); font-weight: 800; text-decoration: none; }
.fdhs__cta a:hover { text-decoration: underline; }
.fdhs-ring { flex: none; width: 46px; height: 46px; padding: 3px; border-radius: 50%; background: var(--hs-ig); }
.fdhs-ring img { display: block; width: 100%; height: 100%; padding: 6px; border-radius: 50%; border: 2px solid #fff; background: var(--hs-brand); object-fit: contain; }

/* Cifras */
.fdhs__stats { position: relative; z-index: 2; display: flex; justify-content: center; flex-wrap: wrap; gap: clamp(14px, 3vw, 48px); margin-top: 36px; padding: 0 20px; }
.fdhs-stat { text-align: center; min-width: 130px; }
.fdhs-stat strong { display: block; font: 400 clamp(2.4rem, 2rem + 2vw, 3.6rem)/1 'Anton', sans-serif; color: var(--hs-brand); }
.fdhs-stat span { display: block; margin-top: 6px; color: var(--hs-ink-2); font-weight: 700; font-size: 14px; }

/* Visor a pantalla completa */
.fdhs-viewer { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; background: rgba(20, 8, 14, 0.94); animation: fdhs-in 0.3s var(--hs-ease); }
.fdhs-viewer[hidden] { display: none; }
@keyframes fdhs-in { from { opacity: 0; } }
.fdhs-viewer__story { position: relative; height: min(88vh, 780px); aspect-ratio: 9 / 16; max-width: 94vw; border-radius: 18px; overflow: hidden; background: #000; color: #fff; animation: fdhs-pop 0.4s var(--hs-spring); }
@keyframes fdhs-pop { from { transform: scale(0.88); } }
.fdhs-viewer__media img, .fdhs-viewer__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fdhs-viewer__story::after { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(rgba(0, 0, 0, 0.5), transparent 20%, transparent 75%, rgba(0, 0, 0, 0.3)); pointer-events: none; }
.fdhs-viewer__bars { position: absolute; z-index: 3; top: 12px; left: 12px; right: 12px; display: flex; gap: 4px; }
.fdhs-viewer__bars i { position: relative; flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.4); overflow: hidden; }
.fdhs-viewer__bars i b { position: absolute; inset: 0; background: #fff; transform-origin: left; transform: scaleX(0); }
.fdhs-viewer__bars i.is-done b { transform: none; }
.fdhs-viewer__top { position: absolute; z-index: 3; top: 26px; left: 12px; right: 60px; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.fdhs-viewer__top small { font-weight: 500; opacity: 0.8; }
.fdhs-viewer .fdhs-stk { z-index: 3; scale: 1.35; }
.fdhs-viewer .fdhs-viewer__nav { position: absolute; z-index: 4; top: 60px; bottom: 0; width: 38%; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; cursor: pointer; }
.fdhs-viewer .fdhs-viewer__nav:hover { background: none; }
.fdhs-viewer__nav--l { left: 0; }
.fdhs-viewer__nav--r { right: 0; }
.fdhs-viewer .fdhs-viewer__x, .fdhs-viewer .fdhs-viewer__sound { position: absolute; z-index: 6; display: grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.16); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.fdhs-viewer .fdhs-viewer__x { top: 18px; right: 22px; }
.fdhs-viewer .fdhs-viewer__sound { top: auto; bottom: 16px; right: 12px; width: 36px; height: 36px; font-size: 16px; background: rgba(0, 0, 0, 0.35); }
.fdhs-viewer__sound[hidden] { display: none !important; }
body.fdhs-lock { overflow: hidden; }

@media (max-width: 767px) {
	.fdhs .fdhs-st { width: 160px; border-radius: 18px; }
	.fdhs-stk--emoji { font-size: 26px; }
	.fdhs-stk--text { font-size: 13px; }
	.fdhs-stk--mention { font-size: 10.5px; padding: 5px 8px; }
	.fdhs-g { width: 54px; }
	.fdhs-pj { width: 84px; }
	.fdhs-pj--0 { left: -6px; top: 8px; }
	.fdhs-pj--1 { right: -6px; top: 0; }
	.fdhs-pj--2, .fdhs-pj--3 { display: none; }
	.fdhs-g--0 { left: -8px; top: 14px; }
	.fdhs-g--1 { right: -8px; top: 4px; }
	.fdhs__cta { border-radius: 22px; }
	.fdhs-viewer .fdhs-viewer__x { top: 10px; right: 10px; }
	.fdhs-viewer__story { height: 100%; max-height: 100dvh; max-width: 100vw; border-radius: 0; aspect-ratio: auto; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.fdhs *, .fdhs *::before, .fdhs *::after { animation: none !important; transition-duration: 0.01ms !important; }
}
