/* Centro de Ayuda — centraldehosting.cl/ayuda — misma familia visual del comparador */
:root {
  --navy: #213448; --ocean: #547792; --sky: #94B4C1; --pearl: #EEEEEE;
  --bg-soft: #F8FAFC; --border: #E5E7EB; --white: #FFFFFF;
  --text-body: #374151; --text-light: #6B7280; --success: #16a34a;
  --radius-sm: 8px; --radius-md: 16px; --radius-lg: 24px;
  --shadow-sm: 0 2px 8px rgba(33,52,72,.07); --shadow-md: 0 6px 24px rgba(33,52,72,.12);
  --shadow-lg: 0 16px 48px rgba(33,52,72,.15); --transition: .22s ease;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; color: var(--text-body); background: var(--bg-soft); line-height: 1.65; }
a { color: var(--ocean); text-decoration: none; }
a:hover { color: var(--navy); }
img { max-width: 100%; height: auto; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ── Topbar (familia del comparador) ── */
.topbar { background: var(--white); border-bottom: 1px solid var(--border); padding: 14px 0; position: sticky; top: 0; z-index: 50; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; color: inherit; }
.logo-icon { width: 38px; height: 38px; flex: none; }
.logo-text { font-family: 'Sora', sans-serif; font-size: 17px; font-weight: 700; color: var(--navy); line-height: 1.2; }
.logo-text span { display: block; font-size: 11px; font-weight: 400; color: var(--ocean); font-family: 'Inter', sans-serif; }
.topbar-nav { display: flex; align-items: center; gap: 8px; }
.topbar-link { font-size: 13px; font-weight: 500; color: var(--text-light); padding: 6px 12px; border-radius: var(--radius-sm); transition: color var(--transition), background var(--transition); }
.topbar-link:hover { color: var(--navy); background: var(--pearl); }
.topbar-cta { background: var(--navy); color: var(--white); padding: 9px 20px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; transition: background var(--transition); }
.topbar-cta:hover { background: var(--ocean); color: var(--white); }

/* ── Hero + buscador ── */
.hero-ayuda { background: linear-gradient(155deg, #EFF6FF 0%, #F0F9FF 40%, var(--white) 100%); padding: 56px 0 48px; text-align: center; border-bottom: 1px solid var(--border); }
.hero-ayuda h1 { font-family: 'Sora', sans-serif; font-size: clamp(26px, 4vw, 38px); color: var(--navy); margin-bottom: 10px; }
.hero-ayuda p { color: var(--text-light); max-width: 560px; margin: 0 auto 28px; }
.buscador { position: relative; max-width: 560px; margin: 0 auto; }
.buscador input { width: 100%; padding: 15px 20px 15px 48px; font: inherit; font-size: 15px; border: 1.5px solid var(--border); border-radius: var(--radius-md); background: var(--white); box-shadow: var(--shadow-sm); outline: none; transition: border-color var(--transition), box-shadow var(--transition); }
.buscador input:focus { border-color: var(--ocean); box-shadow: var(--shadow-md); }
.buscador svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; stroke: var(--text-light); pointer-events: none; }
.buscador-resultados { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); max-height: 420px; overflow-y: auto; text-align: left; z-index: 60; display: none; }
.buscador-resultados.abierto { display: block; }
.buscador-resultados a { display: block; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.buscador-resultados a:last-child { border-bottom: none; }
.buscador-resultados a:hover { background: var(--bg-soft); }
.buscador-resultados .r-titulo { font-weight: 600; color: var(--navy); font-size: 14px; }
.buscador-resultados .r-cat { font-size: 12px; color: var(--text-light); }
.buscador-vacio { padding: 14px 18px; color: var(--text-light); font-size: 14px; }

.buscador-ia-btn { display: block; width: 100%; text-align: left; padding: 12px 18px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ocean); background: var(--bg-soft); border: none; border-top: 1px solid var(--border); cursor: pointer; transition: background var(--transition); }
.buscador-ia-btn:hover { background: var(--pearl); }

/* ── Respuesta del asistente IA ── */
.ia-caja { max-width: 720px; margin: 22px auto 0; text-align: left; }
.ia-caja:empty { display: none; }
.ia-caja { background: var(--white); border: 1px solid var(--border); border-left: 4px solid var(--ocean); border-radius: var(--radius-md); padding: 20px 24px; box-shadow: var(--shadow-sm); }
.ia-caja:not(:has(*)) { display: none; padding: 0; border: none; }
.ia-titulo { font-family: 'Sora', sans-serif; font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.ia-caja p { font-size: 14.5px; margin-bottom: 10px; }
.ia-cargando { color: var(--text-light); font-style: italic; }
.ia-cita { font-size: 11.5px; font-weight: 700; vertical-align: super; }
.ia-fuentes { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 6px; font-size: 12.5px; }
.ia-fuentes span { color: var(--text-light); font-weight: 600; margin-right: 8px; }
.ia-fuentes a { display: block; padding: 3px 0; }
.ia-nota { font-size: 11.5px; color: var(--text-light); margin-top: 10px; }

/* ── Migas ── */
.migas { font-size: 13px; color: var(--text-light); padding: 18px 0 0; }
.migas ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.migas li + li::before { content: '›'; margin-right: 6px; color: var(--sky); }

/* ── Grid categorías ── */
.seccion { padding: 40px 0 56px; }
.seccion h2 { font-family: 'Sora', sans-serif; font-size: 22px; color: var(--navy); margin-bottom: 20px; }
.grid-categorias { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card-categoria { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 22px; transition: box-shadow var(--transition), transform var(--transition); display: block; }
.card-categoria:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-categoria h3 { font-family: 'Sora', sans-serif; font-size: 16px; color: var(--navy); margin-bottom: 6px; }
.card-categoria p { font-size: 13px; color: var(--text-light); margin-bottom: 8px; }
.card-categoria .n-articulos { font-size: 12px; color: var(--ocean); font-weight: 600; }

/* ── Listas de artículos ── */
.lista-articulos { display: flex; flex-direction: column; gap: 10px; }
.item-articulo { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px 22px; display: block; transition: box-shadow var(--transition); }
.item-articulo:hover { box-shadow: var(--shadow-md); }
.item-articulo h3 { font-size: 15px; font-weight: 600; color: var(--navy); }
.item-articulo p { font-size: 13px; color: var(--text-light); margin-top: 4px; }

/* ── Artículo ── */
.layout-articulo { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; padding: 24px 0 64px; align-items: start; }
.articulo { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px 44px; box-shadow: var(--shadow-sm); }
.articulo header h1 { font-family: 'Sora', sans-serif; font-size: clamp(22px, 3vw, 30px); color: var(--navy); line-height: 1.25; margin-bottom: 10px; }
.articulo .bajada { color: var(--text-light); font-size: 15px; margin-bottom: 14px; }
.articulo .meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--text-light); border-bottom: 1px solid var(--border); padding-bottom: 18px; margin-bottom: 26px; }
.articulo .meta strong { color: var(--navy); font-weight: 600; }

.articulo-cuerpo { font-size: 15.5px; }
.articulo-cuerpo h2 { font-family: 'Sora', sans-serif; font-size: 20px; color: var(--navy); margin: 30px 0 12px; }
.articulo-cuerpo h3 { font-family: 'Sora', sans-serif; font-size: 17px; color: var(--navy); margin: 24px 0 10px; }
.articulo-cuerpo p { margin: 0 0 14px; }
.articulo-cuerpo ul, .articulo-cuerpo ol { margin: 0 0 14px 22px; }
.articulo-cuerpo li { margin-bottom: 6px; }
.articulo-cuerpo img { border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); cursor: zoom-in; margin: 6px 0; }
.articulo-cuerpo pre { background: #0F172A; color: #E2E8F0; border-radius: var(--radius-sm); padding: 16px 18px; overflow-x: auto; font-size: 13.5px; margin: 0 0 16px; }
.articulo-cuerpo code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: .92em; }
.articulo-cuerpo :not(pre) > code { background: var(--pearl); color: var(--navy); padding: 2px 6px; border-radius: 4px; }
.articulo-cuerpo table { border-collapse: collapse; width: 100%; margin: 0 0 16px; font-size: 14px; }
.articulo-cuerpo th, .articulo-cuerpo td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.articulo-cuerpo th { background: var(--bg-soft); color: var(--navy); }
.articulo-cuerpo blockquote { border-left: 4px solid var(--sky); background: var(--bg-soft); padding: 12px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 0 0 16px; }
.articulo-cuerpo iframe { max-width: 100%; border: 0; border-radius: var(--radius-sm); }
.video-responsive { position: relative; padding-top: 56.25%; margin: 0 0 16px; }
.video-responsive iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ── Pasos de tutorial (ex-Wizardshot) ── */
.pasos-tutorial { list-style: none; margin: 10px 0 20px; counter-reset: paso; }
.paso { counter-increment: paso; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px 20px; margin-bottom: 14px; }
.paso-texto { display: flex; gap: 12px; align-items: baseline; font-weight: 600; color: var(--navy); margin-bottom: 10px; }
.paso-texto::before { content: counter(paso); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: var(--white); font-size: 13px; display: inline-flex; align-items: center; justify-content: center; transform: translateY(4px); }
.paso-imagen { position: relative; display: inline-block; max-width: 100%; }
.paso-imagen img { display: block; border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); cursor: zoom-in; }
.paso-marca { position: absolute; width: 22px; height: 22px; border-radius: 50%; background: rgba(84,119,146,.35); border: 2.5px solid var(--ocean); transform: translate(-50%, -50%); pointer-events: none; animation: pulso 1.6s ease-out infinite; }
@keyframes pulso { 0% { box-shadow: 0 0 0 0 rgba(84,119,146,.45); } 70% { box-shadow: 0 0 0 14px rgba(84,119,146,0); } 100% { box-shadow: 0 0 0 0 rgba(84,119,146,0); } }

/* ── FAQ ── */
.faq { margin: 26px 0 6px; }
.faq h2 { font-family: 'Sora', sans-serif; font-size: 20px; color: var(--navy); margin-bottom: 12px; }
.faq details { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; background: var(--bg-soft); }
.faq summary { padding: 12px 16px; font-weight: 600; color: var(--navy); cursor: pointer; list-style: none; position: relative; padding-right: 36px; }
.faq summary::after { content: '+'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--ocean); font-size: 18px; font-weight: 700; }
.faq details[open] summary::after { content: '–'; }
.faq .faq-r { padding: 0 16px 14px; font-size: 14.5px; }

/* ── Adjuntos ── */
.adjuntos { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; }

/* ── Botón de descarga ── */
.boton-descarga { display: inline-flex; align-items: center; gap: 10px; background: var(--navy); color: var(--white) !important; padding: 12px 22px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; margin: 8px 0 16px; transition: background var(--transition); }
.boton-descarga:hover { background: var(--ocean); }
.boton-descarga svg { width: 18px; height: 18px; }

/* ── Sidebar ── */
.sidebar { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 84px; }
.caja { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px 22px; }
.caja h2 { font-family: 'Sora', sans-serif; font-size: 15px; color: var(--navy); margin-bottom: 12px; }
.caja-relacionados a { display: block; font-size: 13.5px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.caja-relacionados a:last-child { border-bottom: none; }
.caja-cta { background: linear-gradient(155deg, #EFF6FF, var(--white)); }
.caja-cta p { font-size: 13px; color: var(--text-light); margin-bottom: 12px; }
.caja-cta .cta-btn { display: block; text-align: center; background: var(--navy); color: var(--white); padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; margin-bottom: 8px; transition: background var(--transition); }
.caja-cta .cta-btn:hover { background: var(--ocean); }
.caja-cta .cta-btn.sec { background: var(--white); color: var(--navy); border: 1.5px solid var(--border); }
.caja-cta .cta-btn.sec:hover { border-color: var(--ocean); color: var(--ocean); }
.caja-cta .promo { font-size: 12px; color: var(--text-light); text-align: center; }
.caja-cta .promo b { color: var(--success); }

/* ── Feedback ── */
.feedback { margin-top: 34px; border-top: 1px solid var(--border); padding-top: 22px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.feedback span { font-size: 14px; font-weight: 600; color: var(--navy); }
.feedback button { font: inherit; font-size: 14px; padding: 8px 18px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--white); cursor: pointer; transition: all var(--transition); }
.feedback button:hover { border-color: var(--ocean); color: var(--ocean); }
.feedback .gracias { color: var(--success); font-weight: 600; font-size: 14px; }

/* ── Lightbox ── */
.lightbox { position: fixed; inset: 0; background: rgba(15,23,42,.88); z-index: 200; display: none; align-items: center; justify-content: center; padding: 30px; cursor: zoom-out; }
.lightbox.abierto { display: flex; }
.lightbox img { max-width: 96vw; max-height: 92vh; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.lightbox-cerrar { position: absolute; top: 18px; right: 24px; background: none; border: none; color: var(--white); font-size: 34px; cursor: pointer; line-height: 1; }

/* ── Panel deslizable ── */
.panel-velo { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 100; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.panel-velo.abierto { opacity: 1; pointer-events: auto; }
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(760px, 94vw); background: var(--bg-soft); z-index: 110; transform: translateX(102%); transition: transform .3s cubic-bezier(.4,0,.2,1); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.panel.abierto { transform: translateX(0); }
.panel-barra { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; background: var(--white); border-bottom: 1px solid var(--border); flex: none; }
.panel-barra a { font-size: 13px; font-weight: 600; }
.panel-barra button { background: none; border: none; font-size: 26px; color: var(--text-light); cursor: pointer; line-height: 1; }
.panel-cuerpo { overflow-y: auto; padding: 22px; }
.panel-cuerpo .articulo { padding: 28px 30px; }

/* ── Pie ── */
.pie { border-top: 1px solid var(--border); background: var(--white); padding: 28px 0; margin-top: 20px; font-size: 13px; color: var(--text-light); text-align: center; }
.pie a { font-weight: 600; }

@media (max-width: 900px) {
  .layout-articulo { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .articulo { padding: 26px 22px; }
  .topbar-nav .topbar-link { display: none; }
}
