/* ==========================================================================
   Tu primera oficina — complementos-fol.sarastem.com
   ========================================================================== */

:root {
  --blue:       #2f5aae;
  --blue-dark:  #23448a;
  --blue-soft:  #eef2fb;
  --green:      #00795c;
  --green-soft: #e8f4f0;
  --orange:     #c47700;
  --orange-soft:#fbf2e3;
  --purple:     #7b2d91;
  --purple-soft:#f5ecf8;
  --red:        #c2170c;

  --ink:        #15171c;
  --ink-soft:   #4a505c;
  --ink-faint:  #6d7482;
  --line:       #e2e5ec;
  --bg:         #ffffff;
  --bg-alt:     #f6f7fa;

  --font: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --wrap: 1120px;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(21,23,28,.07), 0 6px 16px rgba(21,23,28,.05);
  --shadow-md: 0 4px 12px rgba(21,23,28,.08), 0 20px 48px rgba(21,23,28,.10);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.72;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--blue-dark); text-decoration: underline; }

::selection { background: var(--blue); color: #fff; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--blue); color: #fff; padding: 12px 20px; z-index: 200;
}
.skip-link:focus { left: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-left: 22px; padding-right: 22px; }
.wrap.narrow { max-width: 760px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; min-height: 62px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; color: var(--ink); letter-spacing: -.2px; flex-shrink: 0;
}
.brand:hover { color: var(--blue); text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 6px; }

.site-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  font-size: 14px; font-weight: 600; color: var(--ink-soft);
  padding: 7px 11px; border-radius: 8px; white-space: nowrap;
}
.site-nav a:hover { background: var(--blue-soft); color: var(--blue); text-decoration: none; }
.site-nav a.nav-destacado { background: var(--blue); color: #fff; }
.site-nav a.nav-destacado:hover { background: var(--blue-dark); color: #fff; }
.site-nav a.nav-destacado i { font-size: 10px; margin-right: 3px; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1000px 500px at 12% -10%, rgba(255,255,255,.22), transparent 60%),
    linear-gradient(135deg, #2f5aae 0%, #27478c 48%, #6b2a86 100%);
  color: #fff;
  padding: clamp(56px, 9vw, 104px) 0 clamp(52px, 8vw, 92px);
}
.hero-inner { text-align: center; }
.eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: .10em; text-transform: uppercase;
  color: rgba(255,255,255,.82); margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(2.5rem, 7.5vw, 4.5rem);
  font-weight: 800; line-height: 1.04; letter-spacing: -.028em; margin-bottom: 14px;
}
.hero-sub {
  font-size: clamp(1.05rem, 2.5vw, 1.4rem);
  color: rgba(255,255,255,.93); font-style: italic; font-weight: 400;
  max-width: 660px; margin: 0 auto 30px;
}
.chips {
  list-style: none; display: flex; flex-wrap: wrap; justify-content: center;
  gap: 9px; margin-bottom: 34px; padding: 0;
}
.chips li {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 600;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.26);
  padding: 7px 15px; border-radius: 999px;
}
.chips i { opacity: .85; font-size: 12px; }

/* Tarjeta destacada del vídeo dentro del hero */
.hero-video-card {
  display: flex; align-items: center; gap: 20px; text-align: left;
  max-width: 560px; margin: 0 auto 26px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 16px; padding: 14px;
  color: #fff;
  transition: background .22s ease, transform .22s ease, border-color .22s ease;
}
.hero-video-card:hover {
  background: rgba(255,255,255,.2);
  border-color: rgba(255,255,255,.5);
  transform: translateY(-3px);
  color: #fff; text-decoration: none;
}
.hero-video-thumb {
  position: relative; flex: 0 0 168px; width: 168px;
  border-radius: 10px; overflow: hidden; line-height: 0;
  box-shadow: 0 6px 18px rgba(0,0,0,.28);
}
.hero-video-thumb img { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; }
.play-badge {
  position: absolute; inset: 0; margin: auto;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,.94); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; padding-left: 3px;
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
  transition: transform .22s ease;
}
.hero-video-card:hover .play-badge { transform: scale(1.1); }
.hero-video-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hero-video-label {
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.8);
}
.hero-video-title { font-size: 1.12rem; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; }
.hero-video-meta { font-size: 13px; color: rgba(255,255,255,.82); }
.hero-video-meta i { font-size: 11px; margin-right: 4px; }

.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 15px; font-weight: 700; padding: 13px 26px;
  border-radius: 999px; border: 2px solid transparent;
  transition: transform .18s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: #fff; color: var(--blue); box-shadow: 0 6px 20px rgba(0,0,0,.16); }
.btn-primary:hover { color: var(--blue-dark); }
.btn-ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.14); color: #fff; }

/* Botones fuera del hero */
.downloads .btn-primary { background: var(--blue); color: #fff; box-shadow: var(--shadow-sm); }
.downloads .btn-primary:hover { background: var(--blue-dark); color: #fff; }
.downloads .btn-ghost { border-color: var(--line); color: var(--ink-soft); background: #fff; }
.downloads .btn-ghost:hover { border-color: var(--blue); color: var(--blue); background: #fff; }

/* ---------- Secciones ---------- */
.section { padding: clamp(52px, 8vw, 92px) 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-title {
  font-size: clamp(1.65rem, 4vw, 2.3rem);
  font-weight: 800; letter-spacing: -.02em; line-height: 1.18;
  margin-bottom: 18px; position: relative; padding-bottom: 16px;
}
.section-title::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 58px; height: 4px; border-radius: 2px; background: var(--blue);
}
.sub-title {
  font-size: 1.2rem; font-weight: 800; letter-spacing: -.01em;
  margin: 40px 0 14px;
}
.section-intro { color: var(--ink-soft); max-width: 68ch; margin-bottom: 36px; }
.lead { font-size: 1.1rem; margin-bottom: 20px; }
.section p + p { margin-top: 18px; }

.objetivos { counter-reset: obj; list-style: none; padding: 0; }
.objetivos li {
  counter-increment: obj; position: relative;
  padding: 0 0 0 46px; margin-bottom: 16px; color: var(--ink-soft);
}
.objetivos li::before {
  content: counter(obj);
  position: absolute; left: 0; top: 3px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--blue-soft); color: var(--blue);
  font-size: 14px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Infografía ---------- */
.infografia { margin: 0 0 30px; }
.infografia-btn {
  display: block; width: 100%; max-width: 820px; margin: 0 auto;
  padding: 0; border: 0; background: none; cursor: zoom-in;
  position: relative; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform .25s ease;
}
.infografia-btn:hover { transform: translateY(-3px); }
.infografia-btn img { width: 100%; height: auto; }
.zoom-hint {
  position: absolute; right: 14px; bottom: 14px;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font); font-size: 13px; font-weight: 700; color: #fff;
  background: rgba(21,23,28,.72); padding: 8px 15px; border-radius: 999px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.infografia figcaption {
  text-align: center; font-size: 13.5px; color: var(--ink-faint);
  margin-top: 18px; font-style: italic;
}
.downloads { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ---------- Familias de riesgo ---------- */
.familias {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
}
.familia {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.familia-head { padding: 22px 26px 20px; color: #fff; }
.familia-head h3 {
  font-size: 1.15rem; font-weight: 800; letter-spacing: .01em;
  text-transform: uppercase; display: flex; align-items: center; gap: 11px;
}
.familia-head p { font-size: 13.5px; color: rgba(255,255,255,.88); margin-top: 6px; line-height: 1.5; }

.familia-seguridad  .familia-head { background: var(--blue); }
.familia-ambiental  .familia-head { background: var(--green); }
.familia-ergonomica .familia-head { background: var(--orange); }
.familia-psicosocial .familia-head { background: var(--purple); }

.riesgos { list-style: none; padding: 0; margin: 0; flex: 1; }
.riesgos li { padding: 22px 26px; border-top: 1px solid var(--line); }
.riesgos li:first-child { border-top: 0; }
.riesgos h4 { font-size: 1.02rem; font-weight: 800; margin-bottom: 7px; letter-spacing: -.01em; }
.riesgos p { font-size: 15px; line-height: 1.6; color: var(--ink-soft); }
.riesgos .medida { margin-top: 8px; color: var(--ink); font-weight: 600; }
.riesgos .medida::before { content: "→ "; font-weight: 700; }
.tag {
  display: inline-block; margin-top: 12px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  padding: 4px 11px; border-radius: 999px;
}
.familia-seguridad   .tag { background: var(--blue-soft);   color: var(--blue); }
.familia-ambiental   .tag { background: var(--green-soft);  color: var(--green); }
.familia-ergonomica  .tag { background: var(--orange-soft); color: var(--orange); }
.familia-psicosocial .tag { background: var(--purple-soft); color: var(--purple); }

.familia-seguridad   .medida::before { color: var(--blue); }
.familia-ambiental   .medida::before { color: var(--green); }
.familia-ergonomica  .medida::before { color: var(--orange); }
.familia-psicosocial .medida::before { color: var(--purple); }

/* ---------- P·A·S ---------- */
.pas-section { background: var(--red); color: #fff; }
.pas-title { color: #fff; }
.pas-title::after { background: rgba(255,255,255,.65); }
.pas-intro { color: rgba(255,255,255,.88); }

.pas-grid { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.pas-pasos { counter-reset: pas; list-style: none; padding: 0; margin: 0; }
.pas-pasos li {
  counter-increment: pas; position: relative;
  padding: 18px 22px 18px 66px; margin-bottom: 12px;
  background: rgba(255,255,255,.12); border-radius: 12px;
  border: 1px solid rgba(255,255,255,.22);
  font-size: 15.5px; line-height: 1.55;
}
.pas-pasos li::before {
  content: counter(pas);
  position: absolute; left: 18px; top: 17px;
  width: 34px; height: 34px; border-radius: 50%;
  background: #fff; color: var(--red);
  font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.pas-pasos span {
  display: block; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; font-size: 13px; margin-bottom: 2px;
}

.pas-recursos { list-style: none; padding: 0; margin: 0; }
.pas-recursos li {
  display: flex; gap: 13px; align-items: baseline;
  font-size: 15.5px; line-height: 1.55;
  padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.22);
}
.pas-recursos li:last-child { border-bottom: 0; }
.pas-recursos i { width: 18px; flex-shrink: 0; opacity: .9; }

/* ---------- Vídeo ---------- */
.video-wrap {
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-md); background: #000;
  aspect-ratio: 16 / 9;
}
.video-wrap video { width: 100%; height: 100%; display: block; object-fit: contain; }
.video-meta {
  margin-top: 16px; font-size: 14px; color: var(--ink-faint); text-align: center;
}

/* Sección del vídeo destacada */
.section-destacada { border-top: 4px solid var(--blue); }
.eyebrow-dark {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--blue); background: var(--blue-soft);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 16px;
}

/* Declaración de uso de IA */
.nota-ia {
  margin-top: 38px; padding: 22px 26px;
  background: #fff; border: 1px solid var(--line);
  border-left: 4px solid var(--blue); border-radius: 0 12px 12px 0;
}
.nota-ia h3 {
  font-size: .95rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 10px;
  display: flex; align-items: center; gap: 9px;
}
.nota-ia p { font-size: 14.5px; line-height: 1.65; color: var(--ink-soft); margin: 0; }

/* ---------- Reflexión ---------- */
.quote {
  border-left: 4px solid var(--blue);
  background: var(--blue-soft);
  padding: 22px 26px; border-radius: 0 12px 12px 0;
  font-size: 1.16rem; font-style: italic; font-weight: 600;
  color: var(--blue-dark); margin-bottom: 30px;
}

/* ---------- Bibliografía APA ---------- */
.apa p {
  padding-left: 2.5em; text-indent: -2.5em;
  margin-bottom: 18px; font-size: 15.5px; line-height: 1.7; color: var(--ink-soft);
}
.apa p + p { margin-top: 0; }
.apa a { word-break: break-word; overflow-wrap: anywhere; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink); color: rgba(255,255,255,.72);
  padding: 44px 0; text-align: center;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.footer-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; color: #fff; font-size: 16px;
}
.footer-brand img { width: 26px; height: 26px; border-radius: 6px; }
.footer-text { font-size: 14px; }
.footer-legal { font-size: 13px; color: rgba(255,255,255,.52); }
.site-footer a { color: rgba(255,255,255,.88); text-decoration: underline; }
.site-footer a:hover { color: #fff; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(10,11,14,.94);
  display: flex; align-items: flex-start; justify-content: center;
  overflow: auto; padding: 24px; cursor: zoom-out;
  -webkit-overflow-scrolling: touch;
}
.lightbox img {
  max-width: 100%; width: auto; height: auto;
  border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.lightbox-close {
  position: fixed; top: 18px; right: 18px; z-index: 310;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3);
  color: #fff; font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease;
}
.lightbox-close:hover { background: rgba(255,255,255,.28); }
body.no-scroll { overflow: hidden; }

[hidden] { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .site-nav { display: none; }
  html { scroll-padding-top: 74px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding-left: 18px; padding-right: 18px; }
  .familia-head, .riesgos li { padding-left: 20px; padding-right: 20px; }
  .btn { width: 100%; justify-content: center; }
  .hero-actions, .downloads { width: 100%; }
  .lightbox { padding: 12px; }
  .hero-video-card { flex-direction: column; gap: 14px; text-align: center; padding: 14px; }
  .hero-video-thumb { flex: none; width: 100%; }
  .hero-video-text { align-items: center; }
  .nota-ia { padding: 18px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Impresión ---------- */
@media print {
  .site-header, .hero-actions, .downloads, .zoom-hint, .lightbox,
  .video-wrap, .hero-video-card { display: none !important; }
  .eyebrow-dark { color: #000 !important; background: none !important; padding: 0; }
  .nota-ia { border-color: #999 !important; }
  .nota-ia h3 { color: #000 !important; }
  .hero { background: none !important; color: #000 !important; }
  .hero h1, .hero-sub, .eyebrow { color: #000 !important; }
  .chips li { border-color: #999; color: #000; }
  .pas-section { background: none !important; color: #000 !important; }
  .pas-title, .pas-intro { color: #000 !important; }
  .pas-pasos li, .pas-recursos li { border-color: #999; background: none; }
  .pas-pasos li::before { background: #000; color: #fff; }
  .section, .section-alt { background: none !important; border: 0; page-break-inside: avoid; }
  .site-footer { background: none !important; color: #000 !important; }
  a { color: #000 !important; }
}
