/* Repositorio Académico ISTER (complementa /css/style.css) */
.repo-hero { background: radial-gradient(1000px 520px at 90% 10%, #127a43 0%, transparent 60%), linear-gradient(135deg, var(--g-950), var(--g-800)); color: #c9dfd1; padding: 70px 0 120px; position: relative; overflow: hidden; }
.repo-hero::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px); background-size: 26px 26px; mask-image: linear-gradient(90deg, #000, transparent 70%); }
.repo-hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 50px; align-items: center; position: relative; }
.repo-hero-grid > * { min-width: 0; }
.repo-hero h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.3rem); text-transform: none; }
.repo-hero .eyebrow { color: var(--lime); }
.repo-hero .lead { font-size: 1.1rem; max-width: 600px; margin-bottom: 28px; }
.repo-search { display: flex; align-items: center; background: #fff; border-radius: 999px; padding: 6px 6px 6px 20px; box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .5); max-width: 640px; gap: 10px; }
.repo-search > i { color: var(--muted); font-size: 1.1rem; }
.repo-search input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 1rem; padding: 10px 0; min-width: 0; background: transparent; color: var(--ink); }
.repo-search .btn { padding: 12px 24px; }
.hero-quick { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 20px; font-size: .88rem; }
.hero-quick a { color: #fff; border: 1px solid rgba(255, 255, 255, .25); padding: 5px 14px; border-radius: 999px; }
.hero-quick a:hover { background: var(--lime); color: var(--g-950); border-color: var(--lime); }
.repo-photos { position: relative; aspect-ratio: 4/3.3; border-radius: 26px; overflow: visible; }
.repo-photos img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 26px; opacity: 0; transition: opacity 1.2s ease; box-shadow: var(--shadow-lg); }
.repo-photos img.on { opacity: 1; }
.repo-photos::after { content: ''; position: absolute; inset: 18px -18px -18px 18px; border: 2px solid rgba(230, 236, 28, .5); border-radius: 26px; z-index: -1; }
.photo-badge { position: absolute; left: -22px; bottom: 26px; background: #fff; color: var(--ink); border-radius: 16px; padding: 12px 16px; display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow-lg); z-index: 2; font-size: .9rem; }
.photo-badge i { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--g-100); color: var(--g-700); font-size: 1.2rem; }
.photo-badge small { display: block; color: var(--muted); }

.career-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.career-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; color: var(--ink); transition: .25s; }
.career-card:hover { border-color: var(--g-500); box-shadow: var(--shadow); transform: translateY(-4px); color: var(--ink); }
.career-card .icon-box { margin-bottom: 10px; }
.career-card strong { font-size: 1.08rem; line-height: 1.3; }
.career-card small { color: var(--muted); }
.career-card .go { position: absolute; right: 24px; top: 28px; color: var(--g-600); transition: transform .2s; }
.career-card:hover .go { transform: translateX(4px); }

.doc-list-repo { display: grid; gap: 14px; }
.doc-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 20px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; transition: .2s; }
.doc-row:hover { border-color: var(--g-500); box-shadow: var(--shadow); }
.doc-ico { width: 64px; height: 76px; border-radius: 10px; background: linear-gradient(160deg, #fff1f0, #fde2df); color: #c62828; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 1.6rem; position: relative; }
.doc-ico span { font-size: .72rem; font-weight: 800; color: #9b1c1c; margin-top: 2px; }
.doc-main { min-width: 0; }
.doc-main h3 { font-size: 1rem; line-height: 1.4; margin: 6px 0 6px; letter-spacing: 0; }
.doc-main h3 a { color: var(--ink); }
.doc-main h3 a:hover { color: var(--g-600); }
.doc-authors { margin: 0 0 6px; color: var(--g-700); font-weight: 600; font-size: .92rem; }
.doc-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.doc-meta span { display: inline-flex; gap: 5px; align-items: center; }
.doc-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { display: inline-flex; gap: 5px; align-items: center; font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--g-50); color: var(--g-700); text-transform: uppercase; letter-spacing: .04em; }
.tag-type { background: var(--lime); color: var(--g-950); }
.tag-light { background: rgba(255, 255, 255, .12); color: #fff; }
.doc-actions { display: flex; flex-direction: column; gap: 8px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; counter-reset: s; }
.steps li { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 22px 22px; text-align: center; }
.steps .icon-box { margin: 0 auto 14px; }
.steps p { margin: 0; font-weight: 600; color: var(--ink); font-size: .95rem; }
.step-n { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); width: 28px; height: 28px; border-radius: 50%; background: var(--g-700); color: var(--lime); display: grid; place-items: center; font-weight: 800; font-size: .82rem; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.g-item { position: relative; display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; background: var(--g-800); }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.g-item span { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(3, 32, 15, .45); color: #fff; font-size: 1.4rem; opacity: 0; transition: .3s; }
.g-item:hover img { transform: scale(1.06); }
.g-item:hover span { opacity: 1; }
.lightbox { position: fixed; inset: 0; background: rgba(2, 18, 9, .92); z-index: 200; display: none; align-items: center; justify-content: center; padding: 30px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: 12px; box-shadow: 0 30px 60px rgba(0, 0, 0, .5); }
.lightbox button { position: absolute; background: rgba(255, 255, 255, .12); border: 0; color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; }
.lightbox button:hover { background: var(--lime); color: var(--g-950); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }

.verify { display: grid; grid-template-columns: 1.3fr 1fr; gap: 30px; align-items: center; padding: clamp(28px, 5vw, 56px); border-radius: 28px; background: var(--g-50); border: 1px solid var(--g-100); }
.verify h2 { margin-bottom: 10px; }
.verify p { color: var(--muted); margin: 0; }
.verify-box { background: #fff; border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 18px; box-shadow: var(--shadow); }
.verify-box img { max-width: 260px; width: 100%; }

.repo-contact { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: stretch; }
.repo-contact > * { min-width: 0; }
.repo-contact .map iframe { height: 100%; min-height: 380px; }

.repo-quote { background: var(--lime); color: var(--g-950); padding: 46px 0; text-align: center; }
.repo-quote i { font-size: 2.4rem; line-height: 1; display: block; color: var(--g-700); }
.repo-quote p { font-size: clamp(1.1rem, 2.2vw, 1.4rem); font-weight: 700; max-width: 820px; margin: 8px auto 0; letter-spacing: -.01em; }

/* Listado */
.repo-page-hero { padding: 56px 0 50px; }
.repo-page-hero .repo-search { margin-top: 24px; }
.thesis-title { font-size: clamp(1.4rem, 2.8vw, 2.1rem) !important; line-height: 1.3 !important; }
.repo-layout { display: grid; grid-template-columns: 270px 1fr; gap: 36px; align-items: start; }
.repo-layout > * { min-width: 0; }
.facets { position: sticky; top: 110px; display: grid; gap: 18px; }
.facet { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.facet h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 10px; }
.facet a { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); font-size: .9rem; font-weight: 500; }
.facet a span { font-size: .78rem; background: #fff; border-radius: 99px; padding: 0 8px; color: var(--muted); align-self: center; }
.facet a:hover { background: #fff; color: var(--g-700); }
.facet a.on { background: var(--g-700); color: #fff; font-weight: 700; }
.facet a.on span { background: rgba(255, 255, 255, .2); color: #fff; }
.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.results-bar p { margin: 0; }
.results-tools { display: flex; gap: 14px; align-items: center; }
.results-tools select { padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line); font: inherit; font-size: .9rem; background: #fff; }
.clear { font-size: .88rem; font-weight: 600; color: #b42318; }

/* Ficha */
.h-sec { font-size: 1.35rem; margin: 0 0 14px; }
.h-sec:not(:first-child) { margin-top: 40px; }
.pdf-frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #525659; box-shadow: var(--shadow); }
.pdf-frame iframe { width: 100%; height: 78vh; min-height: 520px; border: 0; display: block; }
.muted-sm { font-size: .85rem; color: var(--muted); margin-top: 10px; }
.kw { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.kw a { background: var(--g-50); padding: 5px 12px; border-radius: 99px; font-size: .85rem; font-weight: 600; }
.cite { display: flex; gap: 16px; align-items: flex-start; background: var(--bg-soft); border-left: 4px solid var(--lime-600); border-radius: 0 12px 12px 0; padding: 18px 20px; }
.cite p { margin: 0; flex: 1; font-size: .95rem; }
.btn-light-sm { background: #fff; border: 1px solid var(--line); color: var(--ink); padding: 8px 14px; font-size: .84rem; border-radius: 10px; }
.btn-light-sm:hover { border-color: var(--g-500); color: var(--g-700); }

@media (max-width: 900px) {
  .repo-hero-grid, .verify, .repo-contact, .repo-layout { grid-template-columns: 1fr; }
  .repo-hero { padding: 50px 0 110px; }
  .photo-badge { left: 12px; }
  .repo-photos::after { inset: 12px -10px -12px 10px; }
  .facets { position: static; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .doc-row { grid-template-columns: 48px 1fr; padding: 16px; gap: 14px; }
  .doc-ico { width: 48px; height: 58px; font-size: 1.2rem; }
  .doc-actions { grid-column: 1 / -1; flex-direction: row; }
  .doc-actions .btn { flex: 1; }
  .repo-search { flex-wrap: nowrap; padding-left: 14px; }
  .repo-search .btn { padding: 11px 16px; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cite { flex-direction: column; }
  .pdf-frame iframe { height: 70vh; min-height: 420px; }
}
