/* =================================================================
   WireVet Studio · Centro de tutoriales
   Estética: teatro premium azul (paleta del hero de Ayuda) · vidrio + grano
   Todo scopeado a #wvTut para no filtrar al resto del sistema.
   ================================================================= */

#wvTut {
  --wvt-bg:        #06182e;          /* navy profundo base */
  --wvt-bg-2:      #124b85;          /* azul del hero de Ayuda (#145390) */
  --wvt-ink:       #eaf2fb;
  --wvt-ink-soft:  #aac4e2;          /* celeste suave (familia #d5e6f7) */
  --wvt-ink-dim:   #6b88ac;
  --wvt-line:      rgba(120, 170, 230, .16);
  --wvt-line-2:    rgba(120, 170, 230, .30);
  --wvt-glass:     rgba(255, 255, 255, .04);
  --wvt-glass-2:   rgba(255, 255, 255, .07);
  --wvt-emerald:   #1a6fc4;          /* azul primario (antes esmeralda) */
  --wvt-mint:      #5fa8e6;          /* azul claro de acento (antes menta) */
  --wvt-mint-soft: rgba(77, 159, 230, .14);
  --wvt-shadow:    0 18px 50px -20px rgba(0, 0, 0, .7);
  --wvt-radius:    20px;

  position: relative;
  /* Full-bleed: anula exactamente el padding del .content-wrapper
     (default: 0 1.812rem 1.812rem). En ≤767px pasa a 1.5rem en todos los lados. */
  margin: 0 -1.812rem -1.812rem;
  padding: 0;
  min-height: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(1200px 600px at 78% -8%, rgba(26, 111, 196, .42), transparent 60%),
    radial-gradient(900px 500px at 8% 0%, rgba(95, 168, 230, .14), transparent 55%),
    linear-gradient(180deg, var(--wvt-bg-2), var(--wvt-bg) 46%);
  color: var(--wvt-ink);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  overflow: hidden;
}

/* Grano y glow atmosféricos */
#wvTut .wvt__grain {
  position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
#wvTut .wvt__glow {
  position: absolute; top: -160px; right: -120px; width: 520px; height: 520px; z-index: 0;
  background: radial-gradient(circle, rgba(77, 159, 230, .22), transparent 65%);
  filter: blur(40px); pointer-events: none;
}

#wvTut .wvt__shell {
  position: relative; z-index: 1;
  max-width: 1320px; margin: 0 auto;
  padding: 2.4rem 2rem 3rem;
}

/* ============================ HERO ============================ */
#wvTut .wvt-hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 2rem; align-items: end;
  margin-bottom: 1.6rem;
  padding: 2.3rem clamp(1.4rem, 3vw, 2.6rem);
  border-radius: 24px;
  border: 1px solid rgba(120, 170, 230, .3);
  box-shadow: var(--wvt-shadow);
  /* Gradiente del hero de Ayuda + círculos suaves de profundidad */
  background:
    radial-gradient(420px 420px at 88% 120%, rgba(255, 255, 255, .14), transparent 60%),
    radial-gradient(360px 360px at 6% -30%, rgba(255, 255, 255, .12), transparent 58%),
    linear-gradient(135deg, #11457e 0%, #145390 35%, #1a6fc4 100%);
}
/* Patrón de anillos/círculos (mismo del hero del manual) */
#wvTut .wvt-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='66' height='66'%3E%3Cpath d='M33 16a17 17 0 100 34 17 17 0 000-34zm0 5a12 12 0 110 24 12 12 0 010-24z' fill='%23ffffff' fill-opacity='.05'/%3E%3C/svg%3E");
}
/* Círculos grandes decorativos con borde tenue */
#wvTut .wvt-hero::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  right: -70px; top: -90px; width: 280px; height: 280px; border-radius: 50%;
  border: 40px solid rgba(255, 255, 255, .05);
  box-shadow: -150px 170px 0 -90px rgba(255, 255, 255, .06);
}
#wvTut .wvt-hero__head, #wvTut .wvt-hero__aside { position: relative; z-index: 1; }
#wvTut .wvt-hero__kicker {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: #d7e8fb; margin-bottom: .8rem;
}
#wvTut .wvt-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--wvt-mint);
  box-shadow: 0 0 0 0 rgba(77, 159, 230, .6); animation: wvtPulse 2s infinite;
}
@keyframes wvtPulse {
  0% { box-shadow: 0 0 0 0 rgba(77, 159, 230, .5); }
  70% { box-shadow: 0 0 0 9px rgba(77, 159, 230, 0); }
  100% { box-shadow: 0 0 0 0 rgba(77, 159, 230, 0); }
}
#wvTut .wvt-hero__title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800; font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: .98;
  letter-spacing: -.02em; margin: 0 0 .7rem; color: #fff;
}
#wvTut .wvt-hero__title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--wvt-mint), #bcd9f5);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
#wvTut .wvt-hero__sub {
  color: #dceafb; font-size: .96rem; line-height: 1.6; max-width: 56ch; margin: 0;
}
#wvTut .wvt-hero__aside { display: flex; flex-direction: column; gap: 1rem; }
/* Tarjetas/buscador del hero: más definidas sobre el azul brillante */
#wvTut .wvt-hero .wvt-search,
#wvTut .wvt-hero .wvt-stat {
  background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22);
}
#wvTut .wvt-hero .wvt-stat__lbl { color: #c2d8f2; }
#wvTut .wvt-hero .wvt-search > i,
#wvTut .wvt-hero .wvt-search input { color: #fff; }
#wvTut .wvt-hero .wvt-search input::placeholder { color: rgba(255, 255, 255, .65); }
#wvTut .wvt-dot { background: #eaf3ff; }

/* Buscador */
#wvTut .wvt-search {
  display: flex; align-items: center; gap: .7rem; margin: 0;
  background: var(--wvt-glass); border: 1px solid var(--wvt-line-2);
  border-radius: 999px; padding: .8rem 1.1rem; transition: border-color .2s, background .2s;
  backdrop-filter: blur(8px);
}
#wvTut .wvt-search:focus-within { border-color: var(--wvt-mint); background: var(--wvt-glass-2); }
#wvTut .wvt-search > i { color: var(--wvt-mint); font-size: .95rem; }
#wvTut .wvt-search input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--wvt-ink); font-size: .92rem; font-family: inherit;
}
#wvTut .wvt-search input::placeholder { color: var(--wvt-ink-dim); }
#wvTut .wvt-search__clear {
  background: none; border: none; color: var(--wvt-ink-soft); cursor: pointer; padding: 0; font-size: .85rem;
}
#wvTut .wvt-search__clear:hover { color: var(--wvt-ink); }

/* Stats */
#wvTut .wvt-stats { display: flex; gap: .8rem; }
#wvTut .wvt-stat {
  flex: 1; background: var(--wvt-glass); border: 1px solid var(--wvt-line);
  border-radius: 14px; padding: .7rem .9rem; text-align: center;
}
#wvTut .wvt-stat__num {
  display: block; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800;
  font-size: 1.5rem; line-height: 1; color: #fff;
}
#wvTut .wvt-stat__lbl {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--wvt-ink-dim);
}

/* ========================= CATEGORÍAS ========================= */
#wvTut .wvt-cats {
  display: flex; gap: .55rem; flex-wrap: wrap; margin-bottom: 1.6rem;
}
#wvTut .wvt-cat {
  display: inline-flex; align-items: center; gap: .45rem;
  background: var(--wvt-glass); border: 1px solid var(--wvt-line-2);
  color: var(--wvt-ink-soft); font-size: .82rem; font-weight: 600; font-family: inherit;
  padding: .5rem .95rem; border-radius: 999px; cursor: pointer;
  transition: all .18s ease; white-space: nowrap;
}
#wvTut .wvt-cat:hover { color: var(--wvt-ink); border-color: var(--wvt-line-2); transform: translateY(-1px); }
#wvTut .wvt-cat.is-active {
  background: var(--wvt-mint); border-color: var(--wvt-mint); color: #062138; font-weight: 700;
  box-shadow: 0 8px 20px -8px rgba(77, 159, 230, .6);
}
#wvTut .wvt-cat__n {
  font-size: .72rem; background: rgba(255, 255, 255, .12); color: inherit;
  padding: .05rem .4rem; border-radius: 999px; min-width: 1.4em; text-align: center;
}
#wvTut .wvt-cat.is-active .wvt-cat__n { background: rgba(6, 33, 56, .18); }

/* =========================== GRID ============================ */
#wvTut .wvt-grid {
  display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(330px, .95fr); gap: 1.4rem; align-items: start;
}

/* ========================== STAGE =========================== */
#wvTut .wvt-stage {
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
  border: 1px solid var(--wvt-line); border-radius: var(--wvt-radius);
  overflow: hidden; box-shadow: var(--wvt-shadow); position: sticky; top: 1rem;
}
#wvTut .wvt-stage__screen {
  position: relative; aspect-ratio: 16 / 9; background: #04101f;
  display: grid; place-items: center;
}
#wvTut .wvt-stage__screen iframe { width: 100%; height: 100%; border: 0; display: block; }
#wvTut .wvt-stage__placeholder {
  display: flex; flex-direction: column; align-items: center; gap: .8rem;
  color: var(--wvt-ink-dim); text-align: center; padding: 2rem;
}
#wvTut .wvt-stage__placeholder i { font-size: 2.6rem; color: var(--wvt-emerald); opacity: .7; }
#wvTut .wvt-stage__placeholder span { font-size: .9rem; }

#wvTut .wvt-stage__info { padding: 1.4rem 1.6rem 1.6rem; }
#wvTut .wvt-stage__toprow {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; margin-bottom: .75rem;
}
#wvTut .wvt-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--wvt-mint-soft); color: var(--wvt-mint);
  border: 1px solid rgba(77, 159, 230, .3);
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: .32rem .7rem; border-radius: 999px;
}
#wvTut .wvt-stage__meta { display: flex; gap: 1.2rem; flex-wrap: wrap; }
#wvTut .wvt-meta { font-size: .82rem; color: var(--wvt-ink-soft); display: inline-flex; align-items: center; gap: .4rem; }
#wvTut .wvt-meta i { color: var(--wvt-ink-dim); }
#wvTut .wvt-meta b { color: var(--wvt-ink); font-weight: 600; }

#wvTut .wvt-stage__title {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700;
  font-size: clamp(1.3rem, 2.2vw, 1.75rem); line-height: 1.15; letter-spacing: -.01em;
  color: #fff; margin: 0 0 .7rem;
}
#wvTut .wvt-stage__desc {
  color: var(--wvt-ink-soft); font-size: .92rem; line-height: 1.7; margin: 0;
  white-space: pre-line; max-height: 4.8em; overflow: hidden; position: relative;
  transition: max-height .3s ease;
}
#wvTut .wvt-stage__desc.is-expanded { max-height: 1600px; }
#wvTut .wvt-expand {
  margin-top: .6rem; background: none; border: none; cursor: pointer; padding: 0;
  color: var(--wvt-mint); font-weight: 700; font-size: .82rem; font-family: inherit;
  display: inline-flex; align-items: center; gap: .4rem;
}
#wvTut .wvt-expand i { transition: transform .25s; }
#wvTut .wvt-expand.is-open i { transform: rotate(180deg); }

/* ========================= PLAYLIST ========================= */
#wvTut .wvt-playlist {
  background: var(--wvt-glass); border: 1px solid var(--wvt-line);
  border-radius: var(--wvt-radius); overflow: hidden;
  display: flex; flex-direction: column; max-height: calc(100vh - 4rem);
}
#wvTut .wvt-playlist__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.05rem 1.2rem; border-bottom: 1px solid var(--wvt-line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), transparent);
}
#wvTut .wvt-playlist__title {
  font-weight: 700; font-size: .9rem; color: var(--wvt-ink); display: inline-flex; align-items: center; gap: .55rem;
}
#wvTut .wvt-playlist__title i { color: var(--wvt-mint); }
#wvTut .wvt-chip-count {
  background: var(--wvt-mint-soft); color: var(--wvt-mint); font-weight: 700; font-size: .78rem;
  padding: .2rem .6rem; border-radius: 999px; min-width: 2em; text-align: center;
}
#wvTut .wvt-playlist__body {
  overflow-y: auto; padding: .6rem; flex: 1; scrollbar-width: thin;
  scrollbar-color: var(--wvt-line-2) transparent;
}
#wvTut .wvt-playlist__body::-webkit-scrollbar { width: 8px; }
#wvTut .wvt-playlist__body::-webkit-scrollbar-thumb { background: var(--wvt-line-2); border-radius: 8px; }

/* Tarjeta de video */
#wvTut .wvt-card {
  display: grid; grid-template-columns: 132px 1fr; gap: .8rem; align-items: stretch;
  padding: .55rem; border-radius: 14px; cursor: pointer; position: relative;
  border: 1px solid transparent; transition: background .18s, border-color .18s, transform .18s;
}
#wvTut .wvt-card:hover { background: var(--wvt-glass-2); transform: translateX(2px); }
#wvTut .wvt-card.is-active {
  background: var(--wvt-mint-soft); border-color: rgba(77, 159, 230, .35);
}
#wvTut .wvt-card.is-active::before {
  content: ""; position: absolute; left: 0; top: 14%; bottom: 14%; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--wvt-mint);
}
#wvTut .wvt-card__thumb {
  position: relative; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden;
  background: #04101f;
}
#wvTut .wvt-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
#wvTut .wvt-card:hover .wvt-card__thumb img { transform: scale(1.07); }
#wvTut .wvt-card__play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(5, 16, 12, .35); opacity: 0; transition: opacity .2s;
}
#wvTut .wvt-card:hover .wvt-card__play,
#wvTut .wvt-card.is-active .wvt-card__play { opacity: 1; }
#wvTut .wvt-card__play span {
  width: 34px; height: 34px; border-radius: 50%; background: var(--wvt-mint); color: #062138;
  display: grid; place-items: center; font-size: .8rem; padding-left: 2px;
  box-shadow: 0 6px 16px -4px rgba(77, 159, 230, .7);
}
#wvTut .wvt-card__dur {
  position: absolute; right: 5px; bottom: 5px;
  background: rgba(5, 16, 12, .85); color: #fff; font-size: .68rem; font-weight: 600;
  padding: .1rem .35rem; border-radius: 5px; letter-spacing: .02em;
}
#wvTut .wvt-card__body { display: flex; flex-direction: column; min-width: 0; padding: .15rem 0; }
#wvTut .wvt-card__cat {
  font-size: .64rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--wvt-mint); margin-bottom: .25rem;
}
#wvTut .wvt-card__title {
  font-size: .85rem; font-weight: 600; line-height: 1.3; color: var(--wvt-ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
#wvTut .wvt-card__foot {
  margin-top: auto; padding-top: .3rem; font-size: .72rem; color: var(--wvt-ink-dim);
  display: flex; align-items: center; gap: .8rem;
}
#wvTut .wvt-card__foot span { display: inline-flex; align-items: center; gap: .3rem; }

/* Skeletons */
#wvTut .wvt-skel-wrap { display: flex; flex-direction: column; gap: .7rem; padding: .4rem; }
#wvTut .wvt-skel {
  height: 78px; border-radius: 14px;
  background: linear-gradient(100deg, rgba(255,255,255,.04) 30%, rgba(255,255,255,.09) 50%, rgba(255,255,255,.04) 70%);
  background-size: 200% 100%; animation: wvtShimmer 1.3s infinite;
}
@keyframes wvtShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Vacío */
#wvTut .wvt-empty {
  text-align: center; color: var(--wvt-ink-dim); padding: 3rem 1.5rem;
}
#wvTut .wvt-empty i { font-size: 2.2rem; color: var(--wvt-emerald); opacity: .6; margin-bottom: .8rem; display: block; }
#wvTut .wvt-empty p { font-size: .88rem; margin: 0; }

/* ========================= ENTRADA ========================= */
#wvTut .wvt-fade { opacity: 0; transform: translateY(10px); animation: wvtFade .5s ease forwards; }
@keyframes wvtFade { to { opacity: 1; transform: none; } }

/* ====================== RESPONSIVE ========================= */
@media (max-width: 991px) {
  #wvTut .wvt-hero { grid-template-columns: 1fr; gap: 1.4rem; align-items: start; }
  #wvTut .wvt-grid { grid-template-columns: 1fr; }
  #wvTut .wvt-stage { position: static; }
  #wvTut .wvt-playlist { max-height: none; }
  #wvTut .wvt-playlist__body { max-height: 560px; }
}
/* El .content-wrapper cambia a padding 1.5rem (todos los lados) en ≤767px */
@media (max-width: 767px) {
  #wvTut { margin: -1.5rem -1.5rem -1.5rem; }
}
@media (max-width: 560px) {
  #wvTut .wvt__shell { padding: 1.6rem 1.1rem 2.2rem; }
  #wvTut .wvt-stats { gap: .5rem; }
  #wvTut .wvt-card { grid-template-columns: 116px 1fr; }
}
