/* Centro de Ayuda y Soporte: hereda tokens, fuentes, encabezado y pie de /styles.css */
.help-page {
  background-color: #edf2fa;
  background-image:
    radial-gradient(circle at 10% 0%, rgba(16, 185, 129, .10), transparent 36%),
    radial-gradient(circle at 90% 8%, rgba(30, 58, 138, .10), transparent 40%),
    url("/assets/patron-aulink.svg");
  background-size: auto, auto, 180px 156px;
  background-attachment: fixed, fixed, scroll;
}
.help-page .link-login { color: var(--navy); }

/* ---------- portada con buscador ---------- */
.help-head {
  width: var(--wrap);
  margin: 28px auto 0;
  padding: 44px 44px 38px;
  border-radius: 24px;
  background: var(--navy);
  background-image:
    radial-gradient(circle at 50% 0%, rgba(16, 185, 129, .24), transparent 54%),
    linear-gradient(135deg, var(--navy) 0%, #15306b 100%);
  color: #dbe4f0;
  box-shadow: var(--shadow);
  text-align: center;
}
.help-kicker {
  display: inline-block;
  margin-bottom: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(128, 231, 193, .18);
  color: #80e7c1;
  font-size: .8125rem;
  font-weight: 700;
}
.help-head h1 {
  font-size: clamp(2rem, 3.8vw, 3.1rem);
  line-height: 1.08;
  color: #fff;
  max-width: 24ch;
  margin-inline: auto;
}
.help-head > p {
  margin: 12px auto 0;
  max-width: 44rem;
  font-size: 1.06rem;
  color: #dbe4f0;
}

.help-search {
  margin: 24px auto 0;
  max-width: 760px;
}
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--white);
  border-radius: 14px;
  border: 2px solid transparent;
  box-shadow: 0 12px 28px -12px rgba(4, 15, 38, .45);
  transition: border-color .15s;
}
.search-box:focus-within { border-color: var(--green); }
.search-ico {
  position: absolute;
  left: 16px;
  width: 20px;
  height: 20px;
  color: var(--muted);
  pointer-events: none;
}
.search-box input {
  width: 100%;
  min-height: 54px;
  padding: 12px 48px 12px 46px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font: 500 1rem/1.4 "Inter", system-ui, sans-serif;
  color: var(--ink);
}
.search-box input::placeholder { color: var(--muted); }
.search-box input:focus { outline: none; }
.search-clear {
  position: absolute;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: var(--tint);
  color: var(--navy);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.search-clear[hidden] { display: none; }
.search-clear:hover { background: var(--blue-soft); }

.search-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  font-size: .85rem;
  color: #cbd5e1;
}
.search-chips button {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .24);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font: 600 .82rem/1.2 "Inter", system-ui, sans-serif;
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.search-chips button:hover {
  background: rgba(16, 185, 129, .22);
  border-color: #80e7c1;
}
.search-status {
  margin-top: 10px;
  min-height: 1.3em;
  font-size: .88rem;
  color: #80e7c1;
  font-weight: 600;
}

/* ---------- filtros por rol ---------- */
.help-wrap {
  width: var(--wrap);
  margin: 26px auto 88px;
}
.role-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}
.role-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: var(--white);
  color: var(--navy);
  font: 600 .92rem/1.1 "Inter", system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 12px -8px rgba(13, 34, 72, .25);
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.role-btn:hover { border-color: var(--blue); color: var(--blue); }
.role-btn[aria-pressed="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.role-count {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}
.role-btn[aria-pressed="true"] .role-count {
  background: rgba(255, 255, 255, .18);
  color: #80e7c1;
}

/* ---------- videos cortos destacados ---------- */
.video-strip {
  margin-bottom: 34px;
  padding: 26px 28px;
  background: var(--white);
  border: 1px solid #d5deeb;
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
}
.video-strip-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 18px;
}
.video-strip-head h2 { font-size: 1.35rem; }
.video-strip-head p { font-size: .94rem; color: var(--muted); }
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.video-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0;
  border: 1px solid #d5deeb;
  border-radius: 16px;
  background: var(--paper);
  overflow: hidden;
  cursor: pointer;
  color: inherit;
  font: inherit;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.video-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: #93b0e8;
}
.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: linear-gradient(135deg, var(--navy) 0%, #1e3a8a 100%);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.video-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
}
.video-play {
  position: absolute;
  left: 12px;
  bottom: 10px;
  z-index: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(16, 185, 129, .96);
  color: var(--navy);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px -6px rgba(13, 34, 72, .5);
  transition: transform .18s var(--ease);
}
.video-card:hover .video-play { transform: scale(1.08); }
.video-play svg { width: 18px; height: 18px; margin-left: 2px; }
.video-card.is-soon .video-play {
  position: relative;
  left: auto;
  bottom: auto;
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .35);
}
.video-dur {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 1;
  padding: 3px 9px;
  border-radius: 8px;
  background: rgba(13, 34, 72, .85);
  color: #fff;
  font-size: .76rem;
  font-weight: 700;
}
.video-role {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 1;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: var(--navy);
  font-size: .74rem;
  font-weight: 700;
}
.video-info {
  padding: 14px 16px 16px;
  display: grid;
  gap: 4px;
}
.video-info strong {
  font: 700 .98rem/1.3 "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--ink);
}
.video-info span {
  font-size: .83rem;
  color: var(--muted);
}

/* ---------- grupos de guías (acordeones nativos) ---------- */
.help-groups {
  display: grid;
  gap: 24px;
}
.help-group {
  background: var(--white);
  border: 1px solid #d5deeb;
  border-radius: 22px;
  padding: 26px 28px;
  box-shadow: var(--shadow-sm);
}
.help-group[hidden] { display: none; }
.group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.group-title {
  display: flex;
  align-items: center;
  gap: 14px;
}
.group-head h2 { font-size: 1.4rem; line-height: 1.2; }
.group-head p { font-size: .92rem; color: var(--muted); margin-top: 2px; }

/* Acordeón accesible: sin headings dentro de summary, chevron junto al texto, animación progresiva */
.guide-list {
  display: grid;
  gap: 10px;
}
.guide {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  scroll-margin-top: 96px;
  transition: border-color .15s, background-color .15s;
}
.guide[hidden] { display: none; }
.guide[open] {
  background: var(--white);
  border-color: #b8c9e6;
}
.guide > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  cursor: pointer;
  font: 650 1rem/1.35 "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--ink);
  border-radius: 14px;
}
.guide > summary::-webkit-details-marker { display: none; }
.guide > summary:hover { background: rgba(30, 58, 138, .04); }
.guide > summary::before {
  content: "";
  inline-size: 1.05em;
  block-size: 1.05em;
  flex: none;
  background-color: var(--blue);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain;
  rotate: -90deg;
}
.guide[open] > summary::before { rotate: 0deg; }
@media (prefers-reduced-motion: no-preference) {
  .guide > summary::before { transition: rotate .2s var(--ease); }
}

.guide-title { flex: 1; }
.guide-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.badge-video {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-ink);
  font: 700 .76rem/1.2 "Inter", system-ui, sans-serif;
}
.badge-soon {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--muted);
  font: 600 .76rem/1.2 "Inter", system-ui, sans-serif;
}

.guide::details-content {
  interpolate-size: allow-keywords;
  overflow: clip;
  contain: layout;
}
.guide:not([open])::details-content { block-size: 0; }
@media (prefers-reduced-motion: no-preference) {
  .guide::details-content {
    transition: block-size, content-visibility, display;
    transition-duration: .28s;
    transition-timing-function: ease-in-out;
    transition-behavior: allow-discrete;
  }
}

.guide-body {
  padding: 4px 20px 20px 44px;
  font-size: .97rem;
  line-height: 1.65;
  color: var(--text);
}
.guide-intro {
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 12px;
}
.guide-steps {
  margin: 0;
  padding-left: 1.35em;
  display: grid;
  gap: 7px;
}
.guide-steps strong { color: var(--ink); }
.guide-tip {
  margin-top: 14px;
  padding: 12px 15px;
  border-left: 4px solid var(--green);
  border-radius: 0 10px 10px 0;
  background: var(--green-soft);
  color: var(--ink);
  font-size: .92rem;
}
.guide-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.btn-watch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  border: 0;
  background: var(--navy);
  color: #fff;
  font: 600 .86rem/1 "Inter", system-ui, sans-serif;
  cursor: pointer;
}
.btn-watch:hover { background: var(--blue); }
.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: var(--white);
  color: var(--navy);
  font: 600 .84rem/1 "Inter", system-ui, sans-serif;
  cursor: pointer;
}
.btn-copy:hover { border-color: var(--blue); color: var(--blue); }

/* Estado sin resultados */
.empty-state {
  padding: 36px 24px;
  text-align: center;
  background: var(--white);
  border: 1px solid #d5deeb;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}
.empty-state[hidden] { display: none; }
.empty-state h3 { font-size: 1.25rem; }
.empty-state p { margin-top: 8px; color: var(--muted); }
.empty-state .btn { margin-top: 18px; }

/* ---------- bloque de soporte directo ---------- */
.support-card {
  margin-top: 34px;
  padding: 34px 36px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--navy) 0%, #15306b 100%);
  color: #dbe4f0;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 24px 36px;
  align-items: center;
}
.support-card h2 { color: #fff; font-size: clamp(1.55rem, 2.6vw, 2.1rem); line-height: 1.15; }
.support-card p { margin-top: 10px; font-size: .98rem; color: #dbe4f0; }
.support-note {
  margin-top: 12px;
  font-size: .88rem;
  color: #a8bddb;
}
.support-actions {
  display: grid;
  gap: 12px;
}
.support-actions .btn { width: 100%; }
.support-actions .btn-ghost {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .3);
  color: #fff;
}
.support-actions .btn-ghost:hover {
  border-color: #80e7c1;
  background: rgba(16, 185, 129, .15);
}

/* ---------- diálogo modal de video (light-dismiss con fallback) ---------- */
.video-dialog {
  width: min(920px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 32px 70px -18px rgba(0, 0, 0, .65);
  overflow: hidden;
}
.video-dialog::backdrop {
  background: rgba(13, 34, 72, .72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.video-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.video-dialog-head h2 {
  color: #fff;
  font-size: 1.1rem;
  line-height: 1.3;
}
.video-dialog-close {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .3);
  background: transparent;
  color: #fff;
  font: 600 .86rem/1 "Inter", system-ui, sans-serif;
  cursor: pointer;
  flex: none;
}
.video-dialog-close:hover { background: rgba(255, 255, 255, .12); }
.video-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #000;
}
.video-stage iframe,
.video-stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 1000px) {
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .support-card { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .help-head { margin-top: 16px; padding: 28px 20px 26px; border-radius: 18px; }
  .help-wrap { margin: 20px auto 64px; }
  .video-strip, .help-group { padding: 20px 16px; border-radius: 18px; }
  .video-grid { grid-template-columns: 1fr; }
  .guide > summary { padding: 14px 14px; font-size: .95rem; }
  .guide-body { padding: 4px 14px 18px 14px; }
  .support-card { padding: 26px 20px; border-radius: 18px; }
}
