/* LabAncestral · caja_herramientas.css
   Caja de herramientas pública: las carpetas abiertas al sitio. */

.rc-page {
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
  background: #f6efe1;
  color: #152514;
  font-family: 'IBM Plex Sans', sans-serif;
}

.rc-page *,
.rc-page *::before,
.rc-page *::after { min-width: 0; }

.rc-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
}

/* ── HERO ───────────────────────────────────────── */

.rc-hero {
  position: relative;
  padding: 70px 44px 58px;
  overflow: hidden;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.rc-breadcrumb {
  margin-bottom: 24px;
  color: #9a8f74;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  letter-spacing: .16em;
}
.rc-breadcrumb a { color: inherit; text-decoration: none; }
.rc-breadcrumb a:hover { color: #18713a; }

.rc-hero-copy { animation: rc-rise .7s ease both; }

.rc-eyebrow {
  display: inline-block;
  padding: 6px 13px;
  margin-bottom: 20px;
  background: #ee9a1c;
  border-radius: 999px;
  color: #0e3d22;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.rc-hero h1 {
  margin: 0 0 22px;
  color: #152514;
  font-family: 'Spectral', serif;
  font-size: 56px;
  font-weight: 300;
  letter-spacing: -.02em;
  line-height: 1.04;
}
.rc-hero h1 em { color: #18713a; font-style: italic; font-weight: 500; }

.rc-hero-copy > p {
  max-width: 560px;
  margin: 0;
  color: #54503f;
  font-size: 17px;
  line-height: 1.66;
}

/* ── SECCIONES ──────────────────────────────────── */

.rc-section { width: 100%; padding: 64px 44px; }
.rc-section--folder { padding-top: 44px; }

.rc-kicker {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 18px;
  color: #9a8f74;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.rc-kicker > span { display: block; width: 28px; height: 1px; flex: 0 0 28px; background: #c2b48f; }
.rc-kicker--orange { color: #ee9a1c; }
.rc-kicker--orange > span { background: #ee9a1c; }
* + .rc-kicker { margin-top: 44px; }

.rc-section h2,
.rc-cta h2 {
  max-width: 620px;
  margin: 0 0 40px;
  color: #152514;
  font-family: 'Spectral', serif;
  font-size: 38px;
  font-weight: 300;
  line-height: 1.1;
}

.rc-note {
  margin: 0 0 28px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #e4d9c2;
  border-left: 4px solid #18713a;
  border-radius: 10px;
  color: #3d5240;
  font-size: 14.5px;
}
.rc-note a { color: #18713a; font-weight: 600; }

.rc-empty {
  padding: 40px 24px;
  background: #fff;
  border: 1px dashed #d9cdae;
  border-radius: 14px;
  color: #7a745f;
  text-align: center;
}

.rc-back { margin: 44px 0 0; }
.rc-back a { color: #18713a; font-weight: 600; text-decoration: none; }
.rc-back a:hover { text-decoration: underline; }

/* ── CARPETAS ───────────────────────────────────── */

.rc-folders {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.rc-folder {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 22px;
  background: #fff;
  border: 1px solid #e4d9c2;
  border-radius: 18px;
  color: inherit;
  text-decoration: none;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.rc-folder:hover {
  transform: translateY(-3px);
  border-color: #18713a;
  box-shadow: 0 18px 32px -20px rgba(22, 51, 28, .45);
}

.rc-folder__icon {
  display: grid;
  place-items: center;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  background: #eef3ea;
  border-radius: 14px;
  color: #18713a;
}
.rc-folder__icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rc-folder__icon--sub { background: #fbf1da; color: #b57a1c; }
.rc-folder__icon--sub svg { fill: #f3c65a; stroke: #d49b2c; }

.rc-folder__body { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.rc-folder__body strong { font-family: 'Spectral', serif; font-size: 20px; font-weight: 500; line-height: 1.2; }
.rc-folder__meta { color: #7a745f; font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; }
.rc-folder__arrow { color: #18713a; font-size: 18px; transition: transform .22s ease; }
.rc-folder:hover .rc-folder__arrow { transform: translateX(4px); }

/* ── DOCUMENTOS PDF ─────────────────────────────── */

.rc-docs { display: grid; gap: 14px; }

.rc-doc {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  background: #fff;
  border: 1px solid #e4d9c2;
  border-radius: 16px;
}

.rc-doc__ext {
  display: grid;
  place-items: center;
  width: 52px;
  height: 62px;
  background: #fff;
  border: 1.5px solid #cdbf9e;
  border-radius: 6px 12px 6px 6px;
  color: #c4382b;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 700;
}

.rc-doc__body h3 {
  margin: 0 0 4px;
  font-family: 'Spectral', serif;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.rc-doc__body p { margin: 0 0 6px; color: #54503f; font-size: 14px; line-height: 1.5; }
.rc-doc__meta { color: #7a745f; font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; }
.rc-doc__actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* ── BOTONES ────────────────────────────────────── */

.rc-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.rc-button--primary { background: #18713a; color: #fff; border: 1px solid #18713a; }
.rc-button--primary:hover { background: #0e3d22; border-color: #0e3d22; }
.rc-button--secondary { background: transparent; color: #18713a; border: 1px solid #a9d3b6; }
.rc-button--secondary:hover { background: #eef3ea; }

/* ── IMÁGENES ───────────────────────────────────── */

.rc-photos {
  columns: 4 240px;
  column-gap: 16px;
}

.rc-photo {
  position: relative;
  display: block;
  margin: 0 0 16px;
  break-inside: avoid;
  overflow: hidden;
  background: #efe6d2;
  border: 1px solid #e4d9c2;
  border-radius: 14px;
  cursor: pointer;
}
.rc-photo img { display: block; width: 100%; height: auto; transition: transform .35s ease; }
.rc-photo:hover img { transform: scale(1.03); }
.rc-photo:focus-visible { outline: 3px solid #18713a; outline-offset: 2px; }

.rc-photo figcaption {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  background: linear-gradient(transparent 45%, rgba(10, 42, 23, .82));
  color: #fff;
  opacity: 0;
  transition: opacity .28s;
}
.rc-photo:hover figcaption,
.rc-photo:focus-visible figcaption { opacity: 1; }
.rc-photo figcaption span { font-family: 'Spectral', serif; font-size: 16px; font-weight: 500; line-height: 1.2; }
.rc-photo figcaption small { margin-top: 4px; color: #cbe0d0; font-family: 'IBM Plex Mono', monospace; font-size: 11px; }

/* ── VIDEOS ─────────────────────────────────────── */

.rc-videos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.rc-video {
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e4d9c2;
  border-radius: 14px;
}
.rc-video video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #0e3d22; object-fit: cover; }
.rc-video figcaption { display: flex; flex-direction: column; gap: 5px; padding: 14px 16px 16px; }
.rc-video figcaption span { font-family: 'Spectral', serif; font-size: 17px; font-weight: 500; line-height: 1.22; }
.rc-video figcaption small { color: #7a745f; font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; }
.rc-video figcaption a { color: #18713a; font-weight: 600; }

/* ── CÓMO USARLO / CTA ──────────────────────────── */

.rc-howto { background: #fff; border-top: 1px solid #e4d9c2; }
.rc-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.rc-step {
  padding: 22px 24px;
  background: #f6efe1;
  border: 1px solid #e4d9c2;
  border-radius: 16px;
}
.rc-step strong { display: block; margin-bottom: 8px; color: #18713a; font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.rc-step p { margin: 0; color: #54503f; font-size: 15px; line-height: 1.6; }

.rc-cta { padding: 64px 44px; background: #0e3d22; color: #fff; }
.rc-cta__inner { max-width: 760px; margin: 0 auto; text-align: center; }
.rc-cta h2 { max-width: none; margin-bottom: 14px; color: #fff; }
.rc-cta p { margin: 0 0 28px; color: #cbe0d0; font-size: 16px; line-height: 1.6; }
.rc-cta__actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.rc-cta .rc-button--primary { background: #ee9a1c; border-color: #ee9a1c; color: #0e3d22; }
.rc-cta .rc-button--primary:hover { background: #f7b24a; border-color: #f7b24a; }
.rc-cta .rc-button--secondary { color: #fff; border-color: rgba(255, 255, 255, .45); }
.rc-cta .rc-button--secondary:hover { background: rgba(255, 255, 255, .1); }

/* ── LIGHTBOX ───────────────────────────────────── */

.rc-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(8, 26, 15, .92);
  backdrop-filter: blur(6px);
}
.rc-lightbox[hidden] { display: none; }

.rc-lightbox__figure { display: flex; flex-direction: column; align-items: center; max-width: 1100px; max-height: 100%; margin: 0; }
.rc-lightbox__figure img { display: block; max-width: 100%; max-height: calc(100vh - 160px); border-radius: 12px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); }
.rc-lightbox__figure figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 14px; color: #fff; text-align: center; }
.rc-lightbox__figure figcaption span { font-family: 'Spectral', serif; font-size: 18px; }
.rc-lightbox__figure figcaption small { color: #cbe0d0; font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; }
.rc-lightbox__figure figcaption a { color: #ee9a1c; font-weight: 600; }

.rc-lightbox__close,
.rc-lightbox__nav {
  position: absolute;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  background: rgba(14, 61, 34, .6);
  border: 1px solid #2c5a3d;
  border-radius: 50%;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.rc-lightbox__close { top: 24px; right: 28px; }
.rc-lightbox__nav { top: 50%; transform: translateY(-50%); }
.rc-lightbox__nav--prev { left: 28px; }
.rc-lightbox__nav--next { right: 28px; }

@keyframes rc-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ── RESPONSIVE ─────────────────────────────────── */

@media (max-width: 920px) {
  .rc-hero { padding: 54px 28px 44px; }
  .rc-hero h1 { font-size: 42px; }
  .rc-section, .rc-cta { padding-left: 28px; padding-right: 28px; }
  .rc-doc { grid-template-columns: auto minmax(0, 1fr); }
  .rc-doc__actions { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 700px) {
  .rc-hero { padding: 44px 18px 36px; }
  .rc-hero h1 { font-size: 34px; }
  .rc-section, .rc-cta { padding: 44px 18px; }
  .rc-section h2, .rc-cta h2 { font-size: 30px; }
  .rc-grid-2 { grid-template-columns: 1fr; }
  .rc-lightbox { padding: 16px; }
  .rc-lightbox__close { top: 10px; right: 10px; }
  .rc-lightbox__nav--prev { left: 8px; }
  .rc-lightbox__nav--next { right: 8px; }
}

/* ── CARGA POR TANDAS ───────────────────────────── */

.rc-more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 18px;
  margin-top: 24px;
}
.rc-more .rc-button[disabled] { opacity: .6; cursor: default; }
.rc-more__estado { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: #5b6b5e; }

/* ── COLECCIONES (portada) ──────────────────────── */

.rc-cols { padding-top: clamp(56px, 7vw, 110px); padding-bottom: clamp(56px, 7vw, 110px); }
.rc-cols .rc-container { max-width: 1280px; }

.rc-cols__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: clamp(32px, 4vw, 56px);
}
.rc-cols__intro { max-width: 660px; }
.rc-cols .rc-kicker { margin-bottom: 16px; }
.rc-cols__title {
  margin: 0;
  font-family: 'Spectral', serif;
  font-weight: 400;
  font-size: clamp(31px, 4vw, 54px);
  line-height: 1.1;
  letter-spacing: -.015em;
  color: #1f2a20;
}
.rc-cols__title em { font-style: italic; color: #2f5d34; }
.rc-cols__counter { display: flex; align-items: center; gap: 18px; }
.rc-cols__counter [data-counter] { font-family: 'Spectral', serif; font-size: 30px; line-height: 1; color: #1f2a20; }
.rc-cols__counter span + span { font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #5b6157; }

.rc-cols__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: clamp(28px, 3.4vw, 52px);
  align-items: start;
}

/* Lista */
.rc-cols__list { display: flex; flex-direction: column; border-top: 1px solid rgba(31, 42, 32, .14); }

.rc-col {
  position: relative;
  display: block;
  padding: 26px 18px 26px 0;
  border-bottom: 1px solid rgba(31, 42, 32, .14);
  color: #1f2a20;
  text-decoration: none;
  overflow: hidden;
  transition: padding-left .5s cubic-bezier(.16, 1, .3, 1);
}
.rc-col.is-active { padding-left: 22px; }
.rc-col:focus-visible { outline: 2px solid #2f5d34; outline-offset: -2px; }

.rc-col__wash {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(47, 93, 52, .10), rgba(47, 93, 52, 0));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .6s cubic-bezier(.16, 1, .3, 1);
  pointer-events: none;
}
.rc-col.is-active .rc-col__wash { transform: scaleX(1); }

.rc-col__inner { position: relative; display: flex; align-items: baseline; gap: clamp(14px, 2vw, 26px); }
.rc-col__num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px; letter-spacing: .04em; color: #5b6157; min-width: 26px;
  transition: color .45s ease;
}
.rc-col.is-active .rc-col__num { color: #2f5d34; }
.rc-col__body { flex: 1; min-width: 0; }
.rc-col__name {
  display: block;
  font-family: 'Spectral', serif;
  font-size: clamp(27px, 3.1vw, 41px);
  line-height: 1.14;
  letter-spacing: -.012em;
  transform-origin: left center;
  transition: transform .55s cubic-bezier(.16, 1, .3, 1), color .4s ease;
}
.rc-col.is-active .rc-col__name { transform: translateX(4px); color: #1c3a22; }
.rc-col__meta {
  display: block; margin-top: 9px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #5b6157;
}
.rc-col__arrow {
  font-size: 22px; color: #2f5d34; opacity: 0; transform: translateX(-12px);
  transition: opacity .45s ease, transform .5s cubic-bezier(.16, 1, .3, 1);
}
.rc-col.is-active .rc-col__arrow { opacity: 1; transform: none; }

.rc-cols__foot {
  padding-top: 26px;
  font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: .02em; color: #5b6157;
}

/* Escenario (portada de la colección activa) */
.rc-stage {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: #ede6d8;
  aspect-ratio: 4 / 5;
  min-height: 380px;
  max-width: 100%;
  box-shadow: 0 26px 60px rgba(31, 42, 32, .16);
}
.rc-stage__layer {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transform: scale(1.1);
  transition: opacity .8s cubic-bezier(.16, 1, .3, 1), transform 1.1s cubic-bezier(.16, 1, .3, 1);
}
.rc-stage__layer.is-active { opacity: 1; transform: scale(1.02); }
.rc-stage__layer--vacia {
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 30% 20%, #e7dcc2, #c9b98f 70%);
}
.rc-stage__layer--vacia span {
  font-family: 'Spectral', serif; font-size: clamp(24px, 3vw, 40px); font-style: italic;
  color: rgba(31, 42, 32, .5);
}
.rc-stage__shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(31, 42, 32, .72) 0%, rgba(31, 42, 32, .12) 46%, rgba(31, 42, 32, .28) 100%);
}
.rc-stage__top {
  position: absolute; left: 0; right: 0; top: 0;
  padding: 22px 24px;
  display: flex; justify-content: space-between; align-items: flex-start;
  pointer-events: none;
}
.rc-stage__badge {
  background: rgba(245, 239, 228, .94); color: #1f2a20;
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 8px 14px; border-radius: 999px;
}
.rc-stage__index {
  font-family: 'Spectral', serif; font-size: 40px; line-height: 1; color: #1f2a20;
  background: rgba(245, 239, 228, .94); padding: 6px 16px 8px; border-radius: 14px;
}
.rc-stage__bottom {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 24px 30px; color: #f5efe4; pointer-events: none;
}
.rc-stage__title {
  font-family: 'Spectral', serif;
  font-size: clamp(25px, 2.8vw, 35px); line-height: 1.14; letter-spacing: -.012em;
  transition: opacity .45s ease, transform .55s cubic-bezier(.16, 1, .3, 1);
}
.rc-stage__desc {
  margin-top: 10px; font-size: 15px; line-height: 1.55; color: rgba(245, 239, 228, .82); max-width: 420px;
  text-wrap: pretty;
  transition: opacity .45s ease, transform .55s cubic-bezier(.16, 1, .3, 1);
}
.rc-stage__title.is-out, .rc-stage__desc.is-out { opacity: 0; transform: translateY(12px); }
.rc-stage__bar { margin-top: 18px; height: 2px; background: rgba(245, 239, 228, .22); border-radius: 2px; overflow: hidden; }
.rc-stage__progress { height: 100%; background: #c99a3c; transition: width .7s cubic-bezier(.16, 1, .3, 1); }

@media (max-width: 700px) {
  .rc-stage { aspect-ratio: 4 / 3; min-height: 260px; }
}
@media (prefers-reduced-motion: reduce) {
  .rc-col, .rc-col__wash, .rc-col__name, .rc-col__arrow, .rc-stage__layer,
  .rc-stage__title, .rc-stage__desc, .rc-stage__progress { transition: none; }
}
