/* Página de un artículo científico (Investigación > Artículos científicos > artículo).
   Mismos colores y tipografía del sitio público (fondo #0f0f0f, tarjetas #161616, acento verde #4ade80 / #2e7d32). El sitio público es
   solo oscuro, así que esta página también. */

.ac-body { background: #0f0f0f; }

/* ---------- Barra de progreso de lectura ---------- */
.ac-progreso { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 1100; background: transparent; pointer-events: none; }
.ac-progreso span { display: block; height: 100%; background: linear-gradient(90deg, #2e7d32, #4ade80); transform-origin: left center; transform: scaleX(var(--ac-p, 0)); transition: transform 0.12s linear; }

/* ---------- Hero ---------- */
/* El hero es un <header>: home_style.css le aplica la regla global de la navbar (sticky, z-index 1000, height 50px, padding). Se anula aquí para que quede por debajo de la navbar y de sus desplegables. */
.ac-hero { position: relative; z-index: 0; top: auto; height: auto; padding: 0; justify-content: flex-start; border-bottom: 0; display: flex; align-items: flex-end; min-height: clamp(360px, 52vh, 560px); overflow: hidden; background: #0b1f12; isolation: isolate; }
.ac-hero--sin-portada { min-height: 300px; background: radial-gradient(1200px 400px at 10% 0%, #1b5e20 0%, #0f0f0f 70%); }
.ac-hero__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; filter: blur(1px); transform: scale(1.03); }
/* Degradado oscuro: el título y los autores se leen sobre cualquier portada */
.ac-hero__velo { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgba(15, 15, 15, 0.18) 0%, rgba(15, 15, 15, 0.2) 30%, rgba(15, 15, 15, 0.72) 62%, #0f0f0f 100%), linear-gradient(to right, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0) 60%); }
.ac-hero__cuerpo { width: 100%; max-width: 1180px; margin: 0 auto; padding: 36px 24px 34px; box-sizing: border-box; }

.ac-volver { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 8px; padding: 0 2px; font-size: 13px; font-weight: 700; color: #4ade80; text-decoration: none; }
.ac-volver:hover { text-decoration: underline; }
.ac-volver:focus-visible, .ac-boton:focus-visible, .ac-tam__b:focus-visible, .ac-autor__orcid:focus-visible, .ac-rel:focus-visible, .ac-ficha a:focus-visible { outline: 3px solid #4ade80; outline-offset: 3px; border-radius: 6px; }

.ac-hero__rotulo { margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #86efac; }
.ac-titulo { margin: 0 0 14px; max-width: 28ch; font-size: clamp(1.9rem, 4.6vw, 3.1rem); font-weight: 800; line-height: 1.12; letter-spacing: -0.015em; color: #fff; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7), 0 4px 24px rgba(0, 0, 0, 0.75); overflow-wrap: anywhere; }
.ac-revista { text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 2px 14px rgba(0, 0, 0, 0.65); display: flex; align-items: baseline; gap: 10px; margin: 0 0 18px; font-size: 1.05rem; font-style: italic; color: #cbd5e1; }
.ac-revista i { color: #4ade80; font-style: normal; }

/* Autores como etiquetas con icono y enlace a su ORCID */
.ac-autores { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ac-autor { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border: 1px solid #2f3a2f; border-radius: 999px; background: rgba(15, 15, 15, 0.88); backdrop-filter: blur(4px); font-size: 14px; color: #f3f4f6; }
.ac-autor__nombre i { margin-right: 6px; color: #4ade80; font-size: 12px; }
.ac-autor__orcid { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 10px; border-radius: 999px; background: rgba(166, 206, 57, 0.14); border: 1px solid rgba(166, 206, 57, 0.45); color: #c6e26b; font-size: 12px; font-weight: 700; text-decoration: none; }
.ac-autor__orcid:hover { background: rgba(166, 206, 57, 0.26); color: #e2f4a6; }
.ac-autor:not(:has(.ac-autor__orcid)) { padding-right: 12px; }

/* ---------- Estructura de la página ---------- */
.ac-pagina { max-width: 1180px; margin: 0 auto; padding: 8px 24px 80px; box-sizing: border-box; }
.ac-layout { display: flex; flex-direction: column; gap: 28px; padding-top: 24px; }
/* En celular el lateral «desaparece» como caja: la ficha queda justo debajo del hero y los relacionados al final */
.ac-lado { display: contents; }
.ac-ficha { order: 1; }
.ac-lectura { order: 2; min-width: 0; }
.ac-relacionados { order: 3; }

@media (min-width: 1024px) {
    .ac-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; align-items: start; }
    .ac-lectura { order: 0; grid-column: 1; grid-row: 1; }
    .ac-lado { display: flex; flex-direction: column; gap: 22px; grid-column: 2; grid-row: 1; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; scrollbar-width: thin; padding: 2px; }
    .ac-ficha, .ac-relacionados { order: 0; }
}

/* ---------- Columna de lectura ---------- */
.ac-lectura { width: 100%; max-width: 46rem; margin: 0 auto; }
.ac-barra { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid #262626; }
.ac-seccion { margin: 0; font-size: 1.35rem; font-weight: 700; color: #fff; }
.ac-seccion--chica { margin-bottom: 14px; font-size: 1.05rem; }

.ac-tam { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid #2a2a2a; border-radius: 12px; background: #161616; }
.ac-tam__b { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 9px; background: transparent; color: #cbd5e1; font-weight: 700; cursor: pointer; transition: background-color 0.2s, color 0.2s; }
.ac-tam__b:hover { background: #222; }
.ac-tam__b[aria-pressed="true"] { background: #1b5e20; color: #fff; }

/* Resumen: ~65 caracteres por línea, interlineado cómodo, sin justificar ni cortar palabras */
.ac-resumen { max-width: 65ch; color: #d9dde3; line-height: 1.85; overflow-wrap: anywhere; font-size: 1.2rem; }
.ac-resumen[data-tam="1"] { font-size: 1rem; }
.ac-resumen[data-tam="2"] { font-size: 1.2rem; }
.ac-resumen[data-tam="3"] { font-size: 1.45rem; }
.ac-resumen p, .ac-resumen li { text-align: left; hyphens: none; -webkit-hyphens: none; }   /* una alineación elegida en el panel (estilo del párrafo) sigue mandando */
.ac-resumen p { margin: 0 0 1.1em; }
.ac-resumen ul, .ac-resumen ol { margin: 0 0 1.1em 1.4em; padding: 0; }
.ac-resumen ul { list-style: disc; }
.ac-resumen ol { list-style: decimal; }
.ac-resumen li { margin-bottom: 0.4em; }
.ac-resumen h3, .ac-resumen h4 { margin: 1.4em 0 0.5em; color: #fff; line-height: 1.3; }
.ac-resumen blockquote { margin: 0 0 1.1em; padding-left: 16px; border-left: 3px solid #2e7d32; color: #cbd5e1; }
.ac-resumen a { color: #4ade80; text-decoration: underline; text-underline-offset: 3px; }
.ac-resumen em.sp, .ac-resumen .sp { font-style: italic; }
.ac-vacio { color: #94a3b8; font-style: italic; }
.ac-resumen { transition: font-size 0.2s ease; }

/* ---------- Botones ---------- */
.ac-boton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid #2f3a2f; border-radius: 10px; background: #161616; color: #e5e7eb; font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color 0.2s, border-color 0.2s, transform 0.2s; }
.ac-boton:hover { background: #1d2a1f; border-color: #2e7d32; }
.ac-boton--principal { background: #1b5e20; border-color: #1b5e20; color: #fff; }
.ac-boton--principal:hover { background: #2e7d32; border-color: #2e7d32; }
.ac-boton--chico { min-height: 44px; font-size: 13px; }

/* ---------- Ficha ---------- */
.ac-ficha, .ac-relacionados { padding: 20px; border: 1px solid #262626; border-radius: 16px; background: #161616; }
.ac-ficha__t, .ac-relacionados__t { margin: 0 0 14px; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #94a3b8; }
.ac-ficha__lista { margin: 0 0 16px; display: grid; gap: 12px; }
.ac-ficha__lista dt { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #6b7280; }
.ac-ficha__lista dd { margin: 2px 0 0; font-size: 14px; color: #e5e7eb; overflow-wrap: anywhere; }
.ac-ficha__lista a { color: #4da6ff; text-decoration: none; }
.ac-ficha__lista a:hover { text-decoration: underline; }
.ac-ficha__acciones { display: grid; gap: 10px; }

/* ---------- Relacionados ---------- */
.ac-relacionados ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.ac-rel { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid #262626; border-radius: 12px; text-decoration: none; background: #121212; transition: border-color 0.2s, transform 0.2s; }
.ac-rel:hover { border-color: #2e7d32; transform: translateY(-2px); }
.ac-rel img, .ac-rel__ph { flex: none; width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: #000; }
.ac-rel__ph { display: flex; align-items: center; justify-content: center; color: #2e7d32; font-size: 24px; }
.ac-rel__txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ac-rel__txt strong { font-size: 14px; line-height: 1.35; color: #f3f4f6; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ac-rel__txt small { font-size: 12px; color: #94a3b8; font-style: italic; }

/* ---------- Cómo citar ---------- */
.ac-cita { position: relative; margin-top: 44px; padding: 20px 22px 18px; border: 1px solid #262626; border-radius: 16px; background: #161616; }
.ac-cita__t { margin: 0 0 12px; padding-right: 96px; font-size: 1rem; font-weight: 700; color: #fff; }
.ac-copiar { position: absolute; top: 14px; right: 16px; min-height: 36px; padding: 0 12px; border: 1px solid #2a2a2a; border-radius: 8px; background: transparent; color: #cbd5e1; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.ac-copiar:hover { background: #1f1f1f; color: #fff; }
.ac-copiar.is-ok { color: #4ade80; border-color: #2e7d32; }
.ac-copiar:focus-visible, .ac-tab:focus-visible, .ac-bibtex:focus-visible { outline: 3px solid #4ade80; outline-offset: 2px; border-radius: 6px; }

.ac-tabs { display: flex; gap: 18px; margin-bottom: 14px; border-bottom: 1px solid #262626; }
.ac-tabs[hidden] { display: none; }
.ac-tab { position: relative; min-height: 40px; padding: 0 2px; border: 0; background: transparent; color: #94a3b8; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.ac-tab:hover { color: #e5e7eb; }
.ac-tab[aria-selected="true"] { color: #4ade80; }
.ac-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: #4ade80; }

.ac-panel[hidden] { display: none; }
.ac-panel + .ac-panel { margin-top: 12px; }
/* Referencia bibliográfica: serif con sangría francesa */
.ac-cita__texto { margin: 0; padding-left: 2em; text-indent: -2em; font-family: Georgia, 'Times New Roman', serif; font-size: 1rem; line-height: 1.7; color: #e5e7eb; overflow-wrap: anywhere; text-align: left; hyphens: none; }
.ac-bibtex { margin: 0; padding: 12px 14px; border: 1px solid #262626; border-radius: 10px; background: #0f0f0f; font: 13px/1.6 ui-monospace, 'Cascadia Mono', Consolas, monospace; color: #d1d5db; overflow-x: auto; white-space: pre; }
.ac-cita__nota { margin: 14px 0 0; font-size: 12px; line-height: 1.5; color: #8b95a5; }
.ac-aviso { min-height: 0; margin: 0; font-size: 0; line-height: 0; }   /* solo para lectores de pantalla */
.ac-aviso { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 640px) {
    .ac-cita { padding: 16px 16px 14px; }
    .ac-cita__texto { font-size: 0.95rem; }
}

/* ---------- Compartir ---------- */
.ac-compartir { margin-top: 36px; padding-top: 24px; border-top: 1px solid #262626; }
.ac-compartir__botones { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Celular ---------- */
@media (max-width: 640px) {
    .ac-hero__cuerpo { padding: 24px 16px 26px; }
    .ac-pagina { padding: 4px 16px 64px; }
    .ac-autor { font-size: 13px; }
    .ac-ficha__acciones .ac-boton, .ac-compartir__botones .ac-boton { width: 100%; }
    .ac-barra { flex-wrap: wrap; }
}

/* ---------- Movimiento: suave, y nada si la persona lo pide ---------- */
@media (prefers-reduced-motion: no-preference) {
    .ac-hero__cuerpo > * { animation: acEntra 0.6s ease both; }
    .ac-hero__cuerpo > *:nth-child(2) { animation-delay: 0.05s; }
    .ac-hero__cuerpo > *:nth-child(3) { animation-delay: 0.1s; }
    .ac-hero__cuerpo > *:nth-child(4) { animation-delay: 0.15s; }
    .ac-hero__cuerpo > *:nth-child(5) { animation-delay: 0.2s; }
    .ac-hero__img { animation: acZoom 1.6s ease-out both; }
}
@keyframes acEntra { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes acZoom { from { transform: scale(1.08); } to { transform: scale(1.03); } }
@media (prefers-reduced-motion: reduce) {
    .ac-progreso span, .ac-resumen, .ac-rel, .ac-boton, .ac-tam__b { transition: none; }
    .ac-rel:hover { transform: none; }
}
