/* ===== Retos Slider ===== */

:root {
  --reto-verde: 120, 206, 186;
}

.retos-section {
  font-family: 'Inter', sans-serif;
  background: #0a0a0a;
  color: #fff;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  overflow: hidden;
  padding-bottom: 60px;
}

/* HEADER */
.reto-header { text-align: center; padding: 60px 20px 45px; max-width: 850px; margin: 0 auto; }
.reto-header h2 { font-size: clamp(1.6rem,3.8vw,2.6rem); font-weight: 800; line-height: 1.2; margin-bottom: 14px; background: linear-gradient(135deg,#fff 0%,#b0b0b0 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.reto-header p { font-size: clamp(.9rem,1.8vw,1.1rem); color: #777; line-height: 1.6; text-align: left; }
.reto-header p strong { color: rgb(var(--reto-verde)); font-weight: 600; }

/* TRACK */
.reto-track { display: flex; gap: 5px; height: 540px; padding: 0 24px; user-select: none; }

/* SLIDE */
.reto-slide {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: flex .65s cubic-bezier(.4,0,.2,1);
}
.reto-slide.active { flex: 7; cursor: default; }

/* BG */
.reto-bg { position: absolute; inset: 0; background-size: cover; background-position: center; background-color: #151520; transition: transform .7s ease; }
.reto-slide:not(.active):hover .reto-bg { transform: scale(1.07); }

/* OVERLAY */
.reto-overlay { position: absolute; inset: 0; transition: background .5s ease; }
.reto-slide:not(.active) .reto-overlay { background: linear-gradient(to bottom, rgba(0,0,0,.35), rgba(0,0,0,.7)); }
.reto-slide.active .reto-overlay { background: linear-gradient(to bottom, rgba(0,0,0,.05) 0%, rgba(0,0,0,.25) 35%, rgba(0,0,0,.82) 100%); }

/* ACCENT LINE */
.reto-slide::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 3px; background: rgb(var(--reto-verde)); transform: scaleX(0); transition: transform .5s ease .2s; z-index: 4; }
.reto-slide.active::after { transform: scaleX(1); }

/* COLLAPSED */
.reto-collapsed { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 28px; z-index: 3; opacity: 1; transition: opacity .2s ease; }
.reto-slide.active .reto-collapsed { opacity: 0; pointer-events: none; }
.reto-num { font-size: .7rem; font-weight: 800; color: rgb(var(--reto-verde)); letter-spacing: 2px; writing-mode: vertical-rl; transform: rotate(180deg); margin-bottom: 14px; opacity: .8; }
.reto-icon { width: 28px; height: 28px; margin-bottom: 14px; opacity: .9; }
.reto-label { writing-mode: vertical-rl; text-orientation: mixed; transform: rotate(180deg); font-size: 18px; font-weight: 700; white-space: nowrap; color: rgba(255,255,255,.95); }

/* EXPANDED */
.reto-expanded { position: absolute; bottom: 0; left: 0; width: 100%; padding: 40px 35px; z-index: 3; opacity: 0; transform: translateY(14px); transition: opacity .4s ease .15s, transform .4s ease .15s; pointer-events: none; }
.reto-slide.active .reto-expanded { opacity: 1; transform: translateY(0); pointer-events: auto; }

.reto-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(var(--reto-verde),.12); border: 1px solid rgba(var(--reto-verde),.25); border-radius: 20px; padding: 5px 13px; font-size: .7rem; font-weight: 700; color: rgb(var(--reto-verde)); text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 14px; backdrop-filter: blur(4px); }
.reto-title { font-size: clamp(1.2rem,2.5vw,1.65rem); font-weight: 700; line-height: 1.25; margin-bottom: 10px; max-width: 440px; }
.reto-desc { font-size: .92rem; color: rgba(255,255,255,.72); line-height: 1.55; max-width: 470px; margin-bottom: 18px; }
.reto-cta { display: inline-flex; align-items: center; gap: 8px; color: rgb(var(--reto-verde)); font-size: .88rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: gap .3s ease; }
.reto-cta:hover { gap: 14px; }
.reto-cta svg { width: 15px; height: 15px; transition: transform .3s ease; }
.reto-cta:hover svg { transform: translateX(4px); }

/* ANIM ICONS — solo visibles en slide activo */
.anim-icon { position: absolute; z-index: 2; opacity: 0; transition: opacity .5s ease .3s; pointer-events: none; }
.reto-slide.active .anim-icon { opacity: 1; }
.anim-icon .icon-inner { transform: scale(var(--s,1)); transform-origin: center; }
.pos-tl { top: 24px; left: 24px; }
.pos-tr { top: 24px; right: 24px; }
.pos-cr { top: 32%; right: 28px; }
.pos-cl { top: 32%; left: 28px; }
.pos-br { bottom: 120px; right: 24px; }
@keyframes iconFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.float-y { animation: iconFloat 3.2s ease-in-out infinite; }
@keyframes glowPulse { 0%,100% { filter: drop-shadow(0 0 6px rgba(var(--reto-verde),.35)); } 50% { filter: drop-shadow(0 0 18px rgba(var(--reto-verde),.75)); } }
.glow { animation: glowPulse 2.2s ease-in-out infinite; }

/* ECG */
.ecg-wrap { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .5s ease .3s; }
.reto-slide.active .ecg-wrap { opacity: 1; }
.ecg-svg { width: 100%; height: 100%; }
.ecg-path { fill: none; stroke: rgb(var(--reto-verde)); stroke-linecap: round; stroke-linejoin: round; }

/* Widgets */
.w2 { background: rgba(0,0,0,.50); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 10px 10px 9px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.w2 .w2-row { display: flex; align-items: center; gap: 6px; }
.w2 .w2-label { font-size: 8px; letter-spacing: .05em; font-weight: 700; color: rgba(255,255,255,.6); }
.w2 .w2-mono { font-family: ui-monospace, monospace; }
.w2-fat { width: 142px; }
.w2-fat .w2-val { display: flex; align-items: baseline; gap: 6px; margin-top: 2px; }
.w2-fat .w2-num { font-size: 12px; font-weight: 800; color: rgb(var(--reto-verde)); }
.w2-fat .w2-sub { font-size: 8px; color: rgba(var(--reto-verde),.55); }
.w2-nutrition { width: 134px; }
.w2-nutrition .w2-emoji { font-size: 14px; line-height: 1; display: inline-block; }
.w2-nutrition .bar { height: 6px; background: rgba(255,255,255,.10); border-radius: 999px; overflow: hidden; flex: 1; }
.w2-nutrition .bar > i { display: block; height: 100%; width: 0; border-radius: 999px; transition: width .6s ease-out; }
@keyframes emojiPop { 0% { transform: scale(.7) rotate(-12deg); } 70% { transform: scale(1.08); } 100% { transform: scale(1); } }
.w2-nutrition .w2-emoji.pop { animation: emojiPop .55s cubic-bezier(.2,.9,.2,1); }
.w2-smoke { width: 140px; }
.w2-smoke .days { display: grid; grid-template-columns: repeat(7,1fr); gap: 1px; margin: 2px 0 5px; }
.w2-smoke .days span { font-size: 6px; color: rgba(255,255,255,.25); text-align: center; }
.w2-smoke .grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 1px; }
.w2-smoke .cell { height: 13px; border-radius: 3px; background: rgba(255,255,255,.05); display: grid; place-items: center; }
.w2-smoke .cell.ok { background: rgba(34,197,94,.18); }
.w2-smoke .cell.bad { background: rgba(239,68,68,.18); }
.w2-smoke .cell b { font-size: 8px; transform: scale(0); transition: transform .25s cubic-bezier(.2,.9,.2,1); }
.w2-smoke .cell.show b { transform: scale(1); }
.w2-stress { width: 142px; }
.w2-stress .w2-val { display: flex; align-items: baseline; gap: 6px; margin-top: 2px; }
.w2-stress .w2-num { font-size: 11px; font-weight: 800; color: #a78bfa; }
.w2-stress .w2-sub { font-size: 8px; color: rgba(167,139,250,.55); }
.w2-stress-path { stroke-dasharray: 240; stroke-dashoffset: 240; animation: stressDraw 4.8s ease-in-out infinite; }
@keyframes stressDraw { 0% { stroke-dashoffset: 240; } 30% { stroke-dashoffset: 0; } 70% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 240; } }
.w2-sleep { width: 142px; display: flex; align-items: center; gap: 10px; }
.w2-sleep .ring { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(from -90deg,#312e81 0% 0%,#818cf8 0% 0%,rgba(255,255,255,.05) 0% 100%); }
.w2-sleep .ring > span { width: 28px; height: 28px; border-radius: 999px; background: #07070a; display: grid; place-items: center; }
.w2-sleep .dot { width: 5px; height: 5px; border-radius: 999px; }
.w2-sleep .txt { font-size: 8px; color: rgba(255,255,255,.5); }
.w2-focus { width: 132px; height: 55px; position: relative; overflow: hidden; }
.w2-focus .p { position: absolute; border-radius: 999px; will-change: transform,opacity; }
.w2-focus .w2-num { font-size: 8px; font-weight: 700; color: rgba(255,255,255,.6); letter-spacing: .05em; }

/* DOTS */
.reto-dots { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.reto-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.2); border: none; cursor: pointer; padding: 0; transition: all .35s ease; outline: none; }
.reto-dot.active { width: 24px; border-radius: 4px; background: rgb(var(--reto-verde)); }

/* SABER MÁS */
.saber-mas-wrap { display: flex; justify-content: center; padding: 20px 20px 0; }

/* MODAL */
.modal { position: fixed; inset: 0; display: none; z-index: 60; }
.modal.open { display: flex; align-items: center; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.82); backdrop-filter: blur(8px); }
.modal-card { position: relative; z-index: 1; width: min(720px,calc(100% - 28px)); max-height: 90vh; border-radius: 24px; overflow: hidden; background: linear-gradient(180deg,rgba(20,20,20,.97),rgba(10,10,10,.97)); border: 1px solid rgba(255,255,255,.08); box-shadow: 0 40px 120px rgba(0,0,0,.7); display: flex; flex-direction: column; }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 10; width: 38px; height: 38px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.25); background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; cursor: pointer; }
.modal-close:hover { background: rgba(0,0,0,.9); }
.modal-right { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.modal-scroll { overflow-y: auto; flex: 1; padding: 28px 26px 100px; }
.modal-badge { display: inline-flex; align-items: center; gap: 10px; border-radius: 999px; border: 1px solid rgba(var(--reto-verde),.25); background: rgba(var(--reto-verde),.12); padding: 10px 18px; margin-bottom: 16px; }
.modal-badge-dot { width: 9px; height: 9px; border-radius: 99px; background: rgb(var(--reto-verde)); box-shadow: 0 0 18px rgba(var(--reto-verde),.65); }
.modal-badge-txt { font-size: .88rem; font-weight: 800; color: rgb(var(--reto-verde)); text-transform: uppercase; letter-spacing: 1.25px; }
.modal-title { font-size: 1.55rem; font-weight: 800; line-height: 1.2; margin-bottom: 10px; }
.modal-desc { color: rgba(255,255,255,.74); line-height: 1.7; font-size: .95rem; margin-bottom: 16px; }
.modal-feats { display: grid; gap: 8px; margin-top: 10px; }
.modal-feat { display: flex; gap: 10px; align-items: flex-start; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); border-radius: 14px; padding: 10px 12px; }
.modal-feat svg { flex: 0 0 auto; margin-top: 2px; }
.modal-feat span { color: rgba(255,255,255,.83); line-height: 1.4; font-size: .9rem; }
.modal-sticky { padding: 14px 26px 20px; background: linear-gradient(to top,rgba(0,0,0,.97),rgba(0,0,0,.7) 60%,rgba(0,0,0,0)); display: flex; justify-content: center; flex-shrink: 0; }
.modal-cta { width: 100%; border: none; border-radius: 16px; padding: 14px 18px; font-size: .95rem; font-weight: 800; cursor: pointer; background: rgb(var(--reto-verde)); color: #041006; }
.modal-cta:hover { filter: brightness(1.05); }
a.modal-cta{
  text-align: center;
}
/* RESPONSIVE */
@media (max-width: 1024px) {
  .reto-track { height: 460px; }
  .reto-slide.active { flex: 6; }
}
@media (max-width: 768px) {
  .reto-track { height: 420px; padding: 0 12px; }
  .reto-slide.active { flex: 40; }
  .reto-label { display: none; }
  .reto-expanded { padding: 26px 18px; }
  .modal-card { width: calc(100% - 32px); max-height: 85vh; border-radius: 20px; }
  .modal-scroll { padding: 52px 18px 96px; }
  .modal-title { font-size: 1.3rem; }
}
