/* Develop Widgets. Usa las variables del tema y define valores de respaldo. */
.dpw-stats, .dpw-cards, .dpw-includes, .dpw-team, .dpw-test {
  --dpw-night: var(--dp-night, #2a0164);
  --dpw-brand: var(--dp-brand, #400e87);
  --dpw-lilac: var(--dp-lilac, #ede6fb);
  --dpw-gold: var(--dp-gold, #fbb03b);
  --dpw-muted: var(--dp-muted, #5c5566);
  --dpw-line: var(--dp-line, rgba(64, 14, 135, .14));
  --dpw-display: var(--dp-display, 'Poppins', system-ui, sans-serif);
}

/* Aparición progresiva */
.dpw-anim { opacity: 0; transform: translateY(28px); transition: opacity .6s ease var(--dpw-delay, 0ms), transform .6s cubic-bezier(.22, 1, .36, 1) var(--dpw-delay, 0ms); }
.dpw-anim.is-visible { opacity: 1; transform: none; }

/* Botón */
.dpw-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 58px; padding: 16px 34px; border: 0; border-radius: 999px; background: var(--dpw-gold); color: var(--dpw-night) !important; font-family: inherit; font-size: 1.08rem; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer; transition: transform .2s ease, background .2s ease; }
.dpw-btn:hover { background: #e39a1f; transform: translateY(-2px); }
.dpw-btn:disabled { opacity: .6; cursor: wait; }

/* Resultados */
.dpw-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.dpw-stat { grid-column: span 2; padding: clamp(26px, 3vw, 38px); border-radius: 24px; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .18); }
.dpw-stat:nth-child(n+4) { grid-column: span 3; }
.dpw-stat__num { margin: 0; color: var(--dpw-gold); font: 600 clamp(2.8rem, 6vw, 4.75rem)/1 var(--dpw-display); letter-spacing: -.04em; }
.dpw-stat__label { margin: 12px 0 0; color: #fff; font-size: 1.1rem; font-weight: 500; line-height: 1.35; }

/* Tarjetas */
.dpw-cards { display: grid; gap: 24px; }
.dpw-cards--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dpw-cards--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dpw-cards--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dpw-card { display: flex; flex-direction: column; padding: clamp(26px, 3vw, 36px); border-radius: 24px; border: 1px solid var(--dpw-line); background: #fff; color: inherit; text-decoration: none; }
.dpw-card h3 { margin: 0 0 10px; color: var(--dpw-night); font: 600 clamp(1.25rem, 2vw, 1.55rem)/1.2 var(--dpw-display); letter-spacing: -.02em; }
.dpw-card p { margin: 0; color: var(--dpw-muted); font-size: 1.05rem; line-height: 1.5; }
.dpw-cards--icon .dpw-card__img { width: 84px; height: 84px; margin-bottom: 20px; object-fit: contain; }
.dpw-cards--photo .dpw-card__img { width: 100%; aspect-ratio: 4 / 3; margin-bottom: 20px; object-fit: cover; border-radius: 16px; }
.dpw-cards--square .dpw-card__img { width: 100%; aspect-ratio: 1 / 1; margin-bottom: 20px; object-fit: cover; border-radius: 16px; }
.dpw-cards--dark .dpw-card { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); }
.dpw-cards--dark .dpw-card h3 { color: var(--dpw-gold); }
.dpw-cards--dark .dpw-card p { color: #fff; }

/* Lista destacada */
.dpw-includes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.dpw-includes li { display: flex; align-items: center; gap: 16px; min-height: 96px; padding: 16px 22px; border-radius: 20px; background: var(--dpw-gold); color: var(--dpw-night); font-size: 1.1rem; font-weight: 700; line-height: 1.25; box-shadow: 0 14px 28px rgba(227, 154, 31, .28); transition: transform .2s ease; }
.dpw-includes li:hover { transform: translateY(-3px); }
.dpw-includes img { flex: none; width: 56px; height: 56px; object-fit: contain; border-radius: 14px; background: #fff; }

/* Equipo */
.dpw-team { display: grid; gap: 28px; }
.dpw-team--large { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dpw-team--small { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dpw-person__photo { display: grid; place-items: center; aspect-ratio: 4 / 5; overflow: hidden; margin-bottom: 14px; border-radius: 22px; background: linear-gradient(150deg, var(--dpw-lilac), #d9ccf5); }
.dpw-person__photo img { width: 100%; height: 100%; object-fit: cover; }
.dpw-person__photo span { color: var(--dpw-brand); font: 600 clamp(1.8rem, 4vw, 3rem)/1 var(--dpw-display); }
.dpw-person h3 { margin: 0 0 4px; color: var(--dpw-night); font: 600 1.15rem/1.25 var(--dpw-display); letter-spacing: -.02em; }
.dpw-person p { margin: 0 0 6px; color: var(--dpw-muted); font-size: .98rem; line-height: 1.45; }
.dpw-person .dpw-person__role { color: var(--dpw-brand); font-weight: 700; }
.dpw-person__link { color: var(--dpw-brand); font-weight: 700; }
/* Equipo en tarjetas claras con foto redonda (pensado para fondo violeta) */
.dpw-team--round { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.dpw-team--round .dpw-person { display: flex; flex-direction: column; align-items: center; padding: clamp(22px, 2.6vw, 32px) 18px clamp(20px, 2.4vw, 28px); border-radius: 24px; background: #fff; text-align: center; box-shadow: 0 18px 40px rgba(20, 0, 50, .22); transition: transform .2s ease, box-shadow .2s ease; }
.dpw-team--round .dpw-person:hover { transform: translateY(-4px); box-shadow: 0 24px 48px rgba(20, 0, 50, .3); }
.dpw-team--round .dpw-person__photo { width: min(100%, 200px); aspect-ratio: 1; margin-bottom: 18px; border-radius: 50%; box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--dpw-gold); }
.dpw-team--round .dpw-person h3 { font-size: clamp(1.05rem, 1.5vw, 1.2rem); }

.dpw-contact-note { margin: 24px 0 0; padding: 18px 22px; border-radius: 16px; background: var(--dp-lilac, #ede6fb); color: var(--dp-night, #2a0164); font-weight: 600; }

/* Test de nivel */
.dpw-test { max-width: 760px; margin: 0 auto; padding: clamp(26px, 5vw, 52px); border-radius: 30px; background: #fff; border: 1px solid var(--dpw-line); box-shadow: 0 30px 70px rgba(42, 1, 100, .12); color: var(--dpw-night); scroll-margin-top: 110px; }
.dpw-test__screen[hidden] { display: none; }
.dpw-test h1, .dpw-test h2 { margin: 0 0 12px; color: var(--dpw-night); font-family: var(--dpw-display); font-weight: 600; letter-spacing: -.03em; line-height: 1.12; }
.dpw-test h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.dpw-test h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); outline: none; }
.dpw-test__eyebrow { margin: 0 0 10px; color: var(--dpw-brand); font-weight: 700; }
.dpw-test__lead { margin: 0 0 24px; color: var(--dpw-muted); font-size: 1.12rem; }
.dpw-test__hint { margin: 16px 0 0; color: var(--dpw-muted); font-size: .95rem; }
.dpw-test__facts { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 28px; padding: 0; list-style: none; }
.dpw-test__facts li { padding: 10px 16px; border-radius: 999px; background: var(--dpw-lilac); }
.dpw-test__top { display: flex; justify-content: space-between; gap: 16px; color: var(--dpw-muted); font-size: .95rem; font-weight: 600; }
.dpw-test__bar { height: 10px; margin: 10px 0 28px; overflow: hidden; border-radius: 999px; background: var(--dpw-lilac); }
.dpw-test__bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--dpw-gold); transition: width .3s ease; }
.dpw-test__context { margin: 0 0 20px; padding: 16px 20px; border-left: 4px solid var(--dpw-gold); border-radius: 0 14px 14px 0; background: var(--dp-paper, #f8f7f8); color: var(--dpw-night); font-size: 1rem; white-space: pre-line; }
.dpw-test__options { display: grid; gap: 12px; margin-top: 22px; }
.dpw-test__option { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 58px; padding: 12px 16px; border: 2px solid var(--dpw-line); border-radius: 16px; background: #fff; color: var(--dpw-night); font-family: inherit; font-size: 1.05rem; font-weight: 600; line-height: 1.3; text-align: left; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.dpw-test__option:hover { border-color: var(--dpw-brand); background: #fff; color: var(--dpw-night); }
.dpw-test__option[aria-checked="true"], .dpw-test__option[aria-checked="true"]:hover { border-color: var(--dpw-brand); background: var(--dpw-brand); color: #fff; }
.dpw-test__option kbd { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--dpw-lilac); color: var(--dpw-brand); font-family: inherit; font-size: .9rem; font-weight: 700; line-height: 1; }
.dpw-test__back { margin-top: 18px; padding: 8px 0; border: 0; background: none; color: var(--dpw-brand); font-family: inherit; font-size: 1rem; font-weight: 700; line-height: 1.2; text-decoration: underline; cursor: pointer; }
.dpw-test__back:hover { background: none; color: var(--dpw-night); }
.dpw-test__fields { display: grid; gap: 14px; margin-bottom: 16px; }
.dpw-test .dp-field { margin: 0 0 10px; }
.dpw-test .dp-field label { display: block; margin-bottom: 6px; font-weight: 600; }
.dpw-test .dp-field input[type="text"], .dpw-test .dp-field input[type="email"], .dpw-test .dp-field input[type="tel"] { width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid var(--dpw-line); border-radius: 12px; font: inherit; }
.dpw-test .dp-field--check { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 20px; }
.dpw-test .dp-field--check label { flex: 1; font-weight: 400; }
.dpw-test .dp-field__error { display: block; flex-basis: 100%; margin-top: 4px; color: #b3261e; font-size: .92rem; font-weight: 600; }
.dpw-test .dp-hp { position: absolute; left: -9999px; }
.dpw-test__status { min-height: 1.5em; margin: 12px 0 0; font-weight: 600; }
.dpw-test__level { margin: 0; color: var(--dpw-gold); font: 600 clamp(4.5rem, 14vw, 7.5rem)/1 var(--dpw-display); letter-spacing: -.05em; }
.dpw-test__score { margin: 0 0 14px; font-weight: 700; }
.dpw-test__skills { display: grid; gap: 14px; margin: 0 0 28px; padding: 0; list-style: none; }
.dpw-test__skills li { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.dpw-test__skills i { grid-column: 1 / -1; display: block; height: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--dpw-brand) var(--w, 0), var(--dpw-lilac) var(--w, 0)); }

/* Logos en movimiento: la pista contiene dos grupos iguales y se desplaza exactamente la mitad. */
.dpw-logos { overflow: hidden; padding-block: 8px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.dpw-logos__track { display: flex; width: max-content; animation: dpw-marquee var(--dpw-duration, 80s) linear infinite; will-change: transform; }
.dpw-logos:hover .dpw-logos__track { animation-play-state: paused; }
.dpw-logos__group { display: flex; flex: none; margin: 0; padding: 0; list-style: none; }
.dpw-logos__group li { display: flex; flex: none; align-items: center; justify-content: center; width: 200px; height: 112px; margin: 0 8px; padding: 14px 18px; border: 1px solid var(--dp-line, rgba(64, 14, 135, .14)); border-radius: 18px; background: #fff; }
.dpw-logos__group img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
@keyframes dpw-marquee { to { transform: translate3d(-50%, 0, 0); } }
@media (prefers-reduced-motion: reduce) {
  .dpw-logos { overflow-x: auto; }
  .dpw-logos__track { animation: none; }
}

/* Gana a los estilos globales de botón del tema padre. */
.dpw-test button.dpw-btn, a.dpw-btn { background: var(--dpw-gold, #fbb03b); border: 0; color: var(--dpw-night, #2a0164) !important; }
.dpw-test button.dpw-btn:hover, .dpw-test button.dpw-btn:focus, a.dpw-btn:hover { background: #e39a1f; color: var(--dpw-night, #2a0164) !important; }
.dpw-test button.dpw-test__option { background: #fff; border: 2px solid var(--dpw-line); color: var(--dpw-night); }
.dpw-test button.dpw-test__option:hover, .dpw-test button.dpw-test__option:focus { background: var(--dpw-lilac); border-color: var(--dpw-brand); color: var(--dpw-night); }
.dpw-test button.dpw-test__option[aria-checked="true"], .dpw-test button.dpw-test__option[aria-checked="true"]:hover { background: var(--dpw-brand); border-color: var(--dpw-brand); color: #fff; }
.dpw-test button.dpw-test__back, .dpw-test button.dpw-test__back:hover, .dpw-test button.dpw-test__back:focus { border: 0; background: none; color: var(--dpw-brand); }

/* El tema padre pone white-space: nowrap en los botones: los textos largos tienen que bajar de línea. */
.dpw-test, .dpw-test * { box-sizing: border-box; }
.dpw-test { width: 100%; min-width: 0; overflow-wrap: anywhere; }
.dpw-test__options { grid-template-columns: minmax(0, 1fr); }
.dpw-test button.dpw-test__option, .dpw-test button.dpw-btn, a.dpw-btn { max-width: 100%; white-space: normal; text-align: left; }
.dpw-test button.dpw-btn, a.dpw-btn { text-align: center; }
.dpw-test__option span { min-width: 0; }

/* Deslizables: carrusel de fotos y testimonios */
.dpw-slider { --dpw-night: var(--dp-night, #2a0164); --dpw-brand: var(--dp-brand, #400e87); --dpw-lilac: var(--dp-lilac, #ede6fb); --dpw-gold: var(--dp-gold, #fbb03b); --dpw-muted: var(--dp-muted, #5c5566); --dpw-line: var(--dp-line, rgba(64, 14, 135, .14)); --dpw-display: var(--dp-display, 'Poppins', system-ui, sans-serif); position: relative; }
.dpw-slider__track { display: flex; gap: 20px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 2px; padding: 6px 2px 22px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.dpw-slider__track::-webkit-scrollbar { display: none; }
.dpw-slider__track:focus-visible { outline: 3px solid var(--dpw-gold); outline-offset: 4px; border-radius: 12px; }
.dpw-slide { flex: none; margin: 0; scroll-snap-align: start; }
.dpw-slider__nav { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.dpw-slider.is-static .dpw-slider__nav { display: none; }
.dpw-slider button.dpw-slider__btn { display: grid; place-items: center; width: 48px; height: 48px; min-height: 0; padding: 12px; border: 1.5px solid var(--dpw-line); border-radius: 50%; background: #fff; color: var(--dpw-night); cursor: pointer; box-shadow: none; transition: background-color .2s ease, color .2s ease, opacity .2s ease, transform .2s ease; }
.dpw-slider button.dpw-slider__btn:hover:not(:disabled) { background: var(--dpw-night); border-color: var(--dpw-night); color: #fff; transform: translateY(-1px); }
.dpw-slider button.dpw-slider__btn:disabled { opacity: .35; cursor: default; }
.dpw-slider__btn svg { width: 100%; height: 100%; }

.dpw-photo img { display: block; height: var(--dpw-photo-h, 420px); width: auto; max-width: 86vw; object-fit: cover; border-radius: 22px; box-shadow: 0 20px 44px rgba(42, 1, 100, .14); background: var(--dpw-lilac); }
.dpw-slider--h-small { --dpw-photo-h: 300px; }
.dpw-slider--h-large { --dpw-photo-h: 520px; }
.dpw-photo figcaption { margin-top: 10px; color: var(--dpw-muted); font-size: .95rem; }

.dpw-quote { width: min(400px, 84vw); display: flex; flex-direction: column; padding: 30px 28px 24px; border-radius: 24px; background: #fff; color: var(--dpw-night); box-shadow: 0 18px 40px rgba(14, 0, 40, .18); }
.dpw-slider--light .dpw-quote { background: var(--dpw-lilac); box-shadow: none; }
.dpw-quote__mark { width: 34px; height: 28px; color: var(--dpw-gold); margin-bottom: 16px; flex: none; }
.dpw-quote blockquote { flex: 1; margin: 0; padding: 0; border: 0; font-size: 1.05rem; line-height: 1.55; color: #2b2238; quotes: none; }
.dpw-quote blockquote p { margin: 0 0 .7em; }
.dpw-quote blockquote p:last-child { margin-bottom: 0; }
.dpw-quote figcaption, .dpw-quote figcaption * , .dpw-quote blockquote { font-style: normal !important; }
.dpw-quote figcaption { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--dpw-line); }
.dpw-quote__avatar { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--dpw-night); color: #fff; font: 600 1.1rem/1 var(--dpw-display); }
.dpw-quote__who { flex: 1; min-width: 0; display: grid; gap: 2px; }
.dpw-quote__who strong { color: var(--dpw-night); font-size: 1rem; line-height: 1.25; }
.dpw-quote__who span { color: var(--dpw-muted); font-size: .88rem; line-height: 1.3; }
.dpw-quote__source { flex: none; align-self: center; padding: 5px 10px; border-radius: 999px; background: #f4effc; color: var(--dpw-brand); font-size: .75rem; font-weight: 700; white-space: nowrap; text-decoration: none; }
a.dpw-quote__source:hover { background: var(--dpw-gold); color: var(--dpw-night); }
.dpw-slider--dark button.dpw-slider__btn { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .35); color: #fff; }
.dpw-slider--dark button.dpw-slider__btn:hover:not(:disabled) { background: var(--dpw-gold); border-color: var(--dpw-gold); color: var(--dpw-night); }
@media (max-width: 767px) {
  .dpw-slider__track { gap: 14px; }
  .dpw-photo img { --dpw-photo-h: 340px; height: var(--dpw-photo-h); }
  .dpw-quote { padding: 26px 22px 20px; }
  .dpw-quote blockquote { font-size: 1rem; }
  .dpw-quote__source { display: none; }
}

@media (max-width: 1024px) {
  .dpw-includes, .dpw-cards--cols-3, .dpw-cards--cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dpw-team--small, .dpw-team--round { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .dpw-stats { grid-template-columns: 1fr; }
  .dpw-stat, .dpw-stat:nth-child(n+4) { grid-column: auto; }
  .dpw-includes, .dpw-cards--cols-2, .dpw-cards--cols-3, .dpw-cards--cols-4, .dpw-team--large { grid-template-columns: 1fr; }
  .dpw-team--small, .dpw-team--round { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .dpw-team--round .dpw-person { padding: 18px 12px; }
  .dpw-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .dpw-anim, .dpw-btn, .dpw-includes li, .dpw-test__bar i { transition: none; }
}
