:root {
  --uned-green: #004C3B;
  --uned-green-dark: #00382C;
  --uned-green-light: #E6F2EE;
  --uned-green-soft: #7FA99B;

  --paper: #F8F6F0;
  --white: #FFFFFF;
  --text-main: #1E2933;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--paper);
  color: var(--text-main);
}


.cabecera {
  background: var(--uned-green);
  color: var(--white);
  padding: 20px 40px;
}

.marca {
  display: flex;
  gap: 12px;
  align-items: center;
}

.marca strong {
  font-size: 24px;
  letter-spacing: 1px;
}

.marca span {
  font-size: 16px;
}

.contenido {
  padding: 60px 40px;
}

.contenido h1 {
  color: var(--uned-green-dark);
  font-size: 42px;
  margin-bottom: 16px;
}

.contenido p {
  font-size: 20px;
  line-height: 1.5;
}

.portada {
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding: 60px 40px;
}

.hero {
  max-width: 850px;
}

.etiqueta {
  color: var(--uned-green);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 14px;
}

.hero h1 {
  color: var(--uned-green-dark);
  font-size: 56px;
  line-height: 1.05;
  margin: 20px 0;
}

.nombre {
  font-size: 28px;
  font-weight: bold;
  margin: 0 0 20px;
}

.descripcion {
  font-size: 22px;
  line-height: 1.5;
  max-width: 650px;
  margin-bottom: 32px;
}

.boton {
  display: inline-block;
  background: var(--uned-green);
  color: var(--white);
  text-decoration: none;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: bold;
}


.ficha {
  background: var(--white);
  border-left: 6px solid var(--uned-green);
  padding: 24px;
  margin: 32px 0;
  max-width: 760px;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 76, 59, 0.12);
}

.ficha p {
  margin: 0 0 12px;
  font-size: 17px;
  line-height: 1.5;
}

.ficha p:last-child {
  margin-bottom: 0;
}

.ficha strong {
  color: var(--uned-green-dark);
}

.accesos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 40px;
}

.tarjeta {
  background: var(--white);
  border: 1px solid var(--uned-green-light);
  border-top: 5px solid var(--uned-green);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 10px 25px rgba(0, 76, 59, 0.10);
}

.tarjeta span {
  color: var(--uned-green);
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
}

.tarjeta h2 {
  color: var(--uned-green-dark);
  font-size: 22px;
  margin: 10px 0;
}

.tarjeta p {
  font-size: 16px;
  line-height: 1.4;
  margin: 0;
}

@media (max-width: 900px) {
  .accesos {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .accesos {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 38px;
  }

  .portada {
    padding: 40px 20px;
  }
}



.tarjeta {
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tarjeta:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 35px rgba(0, 76, 59, 0.18);
}


.tarjeta {
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tarjeta:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 35px rgba(0, 76, 59, 0.18);
}


.pagina-volumen {
  padding: 80px 40px;
  max-width: 900px;
}

.pagina-volumen h1 {
  color: var(--uned-green-dark);
  font-size: 52px;
  margin: 16px 0;
}

.pagina-volumen p {
  font-size: 20px;
  line-height: 1.6;
}

.pagina-volumen {
  padding: 70px 40px;
  max-width: 1000px;
}

.pagina-volumen h1 {
  color: var(--uned-green-dark);
  font-size: 52px;
  margin: 16px 0;
}

.pagina-volumen p {
  font-size: 20px;
  line-height: 1.6;
}

.zona-libro {
  margin-top: 32px;
  padding: 40px;
  background: var(--white);
  border: 1px solid var(--uned-green-light);
  border-left: 6px solid var(--uned-green);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0, 76, 59, 0.10);
}

.volver {
  display: inline-block;
  margin-top: 32px;
  color: var(--uned-green);
  font-weight: bold;
  text-decoration: none;
}


.lector {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - 70px);
}

.indice-libro {
  background: var(--uned-green-dark);
  color: var(--white);
  padding: 40px 28px;
}

.indice-libro h2 {
  font-size: 26px;
  margin: 10px 0 30px;
}

.indice-libro nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.indice-libro nav a {
  color: var(--white);
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.indice-libro nav a:hover {
  color: var(--uned-green-soft);
}

.pagina-libro {
  padding: 60px;
  background: var(--paper);
}

.pagina-libro h1 {
  color: var(--uned-green-dark);
  font-size: 52px;
  margin: 16px 0;
}

.intro-libro {
  font-size: 20px;
  line-height: 1.6;
  max-width: 780px;
}

.marco-pdf {
  margin-top: 34px;
  min-height: 520px;
  background: var(--white);
  border-radius: 18px;
  border: 1px solid var(--uned-green-light);
  box-shadow: 0 16px 40px rgba(0, 76, 59, 0.12);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.marco-pdf p {
  color: var(--uned-green-dark);
  font-weight: bold;
}


.menu-libro {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-libro a {
  color: var(--white);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.3;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.menu-libro a:hover {
  color: var(--uned-green-soft);
}

.menu-libro details {
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 10px;
  margin-top: 8px;
}

.menu-libro summary {
  cursor: pointer;
  font-weight: bold;
  color: var(--white);
  margin-bottom: 8px;
  font-size: 15px;
}

.menu-libro details a {
  display: block;
  padding-left: 12px;
  font-size: 13px;
}


.marco-pdf {
  margin-top: 34px;
  height: 78vh;
  background: var(--white);
  border-radius: 18px;
  border: 1px solid var(--uned-green-light);
  box-shadow: 0 16px 40px rgba(0, 76, 59, 0.12);
  overflow: hidden;
}

.visor-pdf {
  width: 100%;
  height: 100%;
  border: none;
}


/* ===== LECTOR TIPO LIBRO ===== */

.lector {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  height: calc(100vh - 64px);
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(0, 76, 59, 0.08), transparent 30%),
    var(--paper);
}

/* Índice lateral más estrecho y con scroll propio */
.indice-libro {
  height: calc(100vh - 64px);
  overflow-y: auto;
  background: linear-gradient(180deg, var(--uned-green-dark), var(--uned-green));
  color: var(--white);
  padding: 24px 18px;
  box-sizing: border-box;
  border-right: 8px solid rgba(0, 0, 0, 0.12);
}

/* Hace el índice más compacto */
.indice-libro h2 {
  font-size: 21px;
  line-height: 1.15;
  margin: 8px 0 22px;
}

.indice-libro .etiqueta {
  font-size: 12px;
  color: var(--uned-green-light);
}

.menu-libro {
  gap: 6px;
}

.menu-libro a {
  font-size: 12.5px;
  line-height: 1.25;
  padding: 5px 0;
}

.menu-libro summary {
  font-size: 13px;
  line-height: 1.25;
}

.menu-libro details a {
  font-size: 12px;
  padding-left: 10px;
}

/* Zona derecha: ocupa la pantalla y no obliga a bajar/subir */
.pagina-libro {
  height: calc(100vh - 64px);
  overflow: hidden;
  padding: 28px 34px;
  box-sizing: border-box;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.05), transparent 4%),
    var(--paper);
}

/* Cabecera del lector más compacta */
.pagina-libro .etiqueta {
  margin: 0 0 6px;
}

.pagina-libro h1 {
  font-size: 34px;
  margin: 0 0 8px;
  color: var(--uned-green-dark);
}

.intro-libro {
  font-size: 15px;
  line-height: 1.35;
  max-width: 900px;
  margin: 0 0 18px;
  color: var(--text-main);
}

/* Marco del PDF mucho más grande */
.marco-pdf {
  height: calc(100vh - 170px);
  min-height: 620px;
  background: #fbfaf6;
  border-radius: 10px;
  border: 1px solid rgba(0, 76, 59, 0.18);
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.18),
    inset 18px 0 22px rgba(0, 0, 0, 0.06),
    inset -18px 0 22px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  position: relative;
}

/* Pequeño efecto de lomo/página */
.marco-pdf::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  width: 1px;
  height: 100%;
  background: rgba(0, 76, 59, 0.18);
  z-index: 2;
}

.visor-pdf {
  width: 100%;
  height: 100%;
  border: none;
  background: white;
}

/* Botón de volver más discreto */
.volver {
  display: block;
  margin-top: 22px;
  color: var(--white);
  font-size: 12.5px;
  font-weight: bold;
  text-decoration: none;
  opacity: 0.9;
}

.volver:hover {
  opacity: 1;
  text-decoration: underline;
}


/* ===== AJUSTE FINAL DEL LECTOR ===== */

/* Cabecera más compacta */
.cabecera {
  height: 46px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

/* El lector ocupa exactamente lo que queda bajo la cabecera */
.lector {
  height: calc(100vh - 46px);
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  overflow: hidden;
}

/* El índice tiene su propio scroll */
.indice-libro {
  height: calc(100vh - 46px);
  overflow-y: auto;
  padding: 20px 16px;
  box-sizing: border-box;
}

/* La zona del libro se organiza en columna */
.pagina-libro {
  height: calc(100vh - 46px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 24px 32px 28px;
  box-sizing: border-box;
}

/* Cabecera textual más baja */
.pagina-libro .etiqueta {
  margin: 0 0 4px;
  font-size: 12px;
}

.pagina-libro h1 {
  font-size: 30px;
  margin: 0 0 6px;
}

.intro-libro {
  font-size: 14px;
  line-height: 1.35;
  margin: 0 0 16px;
  max-width: 900px;
}

/* El PDF ocupa todo el espacio restante, sin cortarse */
.marco-pdf {
  flex: 1;
  min-height: 0;
  height: auto;
  margin-top: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #fbfaf6;
  border: 1px solid rgba(0, 76, 59, 0.18);
  box-shadow:
    0 22px 45px rgba(0, 0, 0, 0.18),
    inset 16px 0 20px rgba(0, 0, 0, 0.05),
    inset -16px 0 20px rgba(0, 0, 0, 0.035);
}

/* El iframe rellena completamente el marco */
.visor-pdf {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ===== ESTÉTICA DE LIBRO PARA EL VISOR PDF ===== */

.pagina-libro {
  background:
    radial-gradient(circle at top left, rgba(0, 76, 59, 0.10), transparent 28%),
    radial-gradient(circle at bottom right, rgba(0, 76, 59, 0.08), transparent 32%),
    #efe9dc;
}

/* Marco exterior: parece una mesa o atril */
.marco-pdf {
  position: relative;
  background: #d8cdb8;
  padding: 18px 22px 22px 34px;
  border-radius: 18px;
  border: 1px solid rgba(77, 61, 38, 0.25);

  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.28),
    0 8px 18px rgba(0, 0, 0, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.35);

  overflow: hidden;
}

/* Lomo oscuro del libro */
.marco-pdf::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 22px;
  left: 14px;
  width: 16px;
  border-radius: 10px;
  background:
    linear-gradient(90deg,
      rgba(0, 0, 0, 0.32),
      rgba(255, 255, 255, 0.18),
      rgba(0, 0, 0, 0.18)
    );
  z-index: 3;
}

/* Canto de páginas */
.marco-pdf::after {
  content: "";
  position: absolute;
  top: 18px;
  right: 14px;
  bottom: 22px;
  width: 18px;
  border-radius: 0 10px 10px 0;
  background:
    repeating-linear-gradient(
      to bottom,
      #f7f3ea 0px,
      #f7f3ea 3px,
      #ded5c2 4px
    );
  opacity: 0.9;
  z-index: 3;
}

/* El PDF queda como la página interior */
.visor-pdf {
  position: relative;
  z-index: 2;
  border: none;
  border-radius: 8px;
  background: #ffffff;

  box-shadow:
    inset 12px 0 20px rgba(0, 0, 0, 0.06),
    inset -8px 0 14px rgba(0, 0, 0, 0.04),
    0 0 0 1px rgba(0, 76, 59, 0.10);

  width: 100%;
  height: 100%;
  display: block;
}

/* Título superior más editorial */
.pagina-libro h1 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.03em;
}

/* Texto introductorio más discreto */
.intro-libro {
  color: rgba(30, 41, 51, 0.78);
}

/* Índice como cubierta lateral */
.indice-libro {
  background:
    linear-gradient(180deg, #00382C 0%, #004C3B 55%, #003326 100%);
  box-shadow:
    inset -10px 0 20px rgba(0, 0, 0, 0.18);
}

/* Separadores del índice más elegantes */
.menu-libro details {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.menu-libro summary {
  letter-spacing: 0.01em;
}

.menu-libro a {
  opacity: 0.88;
}

.menu-libro a:hover {
  opacity: 1;
  color: #d8efe6;
}

/* ===== ESTÉTICA DE LIBRO LIMPIA, SIN TAPAR EL SCROLL ===== */

/* Fondo cálido tipo mesa de lectura */
.pagina-libro {
  background:
    radial-gradient(circle at top left, rgba(0, 76, 59, 0.08), transparent 30%),
    linear-gradient(135deg, #f3eee3, #e7dece);
}

/* Marco exterior tipo libro, pero sin elementos encima del PDF */
.marco-pdf {
  position: relative;
  background: #cfc3ad;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(70, 55, 35, 0.22);

  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.24),
    0 8px 18px rgba(0, 0, 0, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.35);

  overflow: hidden;
}

/* Quitamos los adornos anteriores que tapaban la barra */
.marco-pdf::before,
.marco-pdf::after {
  display: none;
}

/* Página interior */
.visor-pdf {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  border-radius: 10px;
  background: white;

  box-shadow:
    0 0 0 1px rgba(0, 76, 59, 0.12),
    inset 10px 0 18px rgba(0, 0, 0, 0.04),
    inset -10px 0 18px rgba(0, 0, 0, 0.035);
}

/* Pequeño efecto de volumen debajo, sin tocar el PDF */
.marco-pdf {
  outline: 8px solid rgba(255, 255, 255, 0.28);
  outline-offset: -12px;
}

/* Título con toque editorial */
.pagina-libro h1 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.03em;
}

/* Cabecera textual más elegante */
.intro-libro {
  color: rgba(30, 41, 51, 0.75);
}

/* Índice como cubierta verde */
.indice-libro {
  background:
    linear-gradient(180deg, #00382C 0%, #004C3B 58%, #003326 100%);
  box-shadow:
    inset -8px 0 18px rgba(0, 0, 0, 0.16);
}

/* ===== ENTRADA ACTIVA DEL ÍNDICE ===== */

.menu-libro a.activo {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-radius: 8px;
  padding-left: 8px;
  font-weight: bold;
  border-bottom-color: transparent;
}

.menu-libro a.activo::before {
  content: "● ";
  color: var(--uned-green-light);
}

/* ===== AJUSTE DE TARJETAS DE LA PORTADA ===== */

.accesos {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

/* ===== REPOSITORIO DE DOCUMENTACIÓN ===== */

.repositorio {
  min-height: calc(100vh - 46px);
  background:
    radial-gradient(circle at top left, rgba(0, 76, 59, 0.08), transparent 30%),
    linear-gradient(135deg, #f8f6f0, #eee6d8);
  padding: 56px 40px 80px;
  box-sizing: border-box;
}

.repositorio-hero {
  max-width: 900px;
  margin-bottom: 42px;
}

.repositorio-hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--uned-green-dark);
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1;
  margin: 12px 0 18px;
}

.repositorio-hero p {
  font-size: 20px;
  line-height: 1.55;
  color: rgba(30, 41, 51, 0.76);
  max-width: 760px;
}

.volver-documentacion {
  display: inline-block;
  margin-top: 18px;
  color: var(--uned-green);
  font-weight: bold;
  text-decoration: none;
}

.volver-documentacion:hover {
  text-decoration: underline;
}

.lista-archivos {
  max-width: 980px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.archivo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;

  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(0, 76, 59, 0.14);
  border-left: 7px solid var(--uned-green);
  border-radius: 16px;

  padding: 20px 24px;
  text-decoration: none;
  color: inherit;

  box-shadow:
    0 14px 28px rgba(0, 76, 59, 0.09),
    inset 0 0 0 1px rgba(255, 255, 255, 0.45);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-left-color 0.2s ease;
}

.archivo:hover {
  transform: translateY(-3px);
  box-shadow:
    0 22px 40px rgba(0, 76, 59, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  border-left-color: var(--uned-green-dark);
}

.archivo-tipo {
  display: inline-block;
  background: var(--uned-green-light);
  color: var(--uned-green-dark);
  font-size: 12px;
  font-weight: bold;
  padding: 4px 9px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.archivo h2 {
  color: var(--uned-green-dark);
  font-size: 22px;
  margin: 0 0 6px;
}

.archivo p {
  margin: 0;
  font-size: 15px;
  color: rgba(30, 41, 51, 0.72);
}

.archivo strong {
  color: var(--uned-green);
  white-space: nowrap;
  font-size: 14px;
}

@media (max-width: 700px) {
  .repositorio {
    padding: 40px 20px 60px;
  }

  .archivo {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ===== PÁGINA DE DEFENSA / DIAPOSITIVAS ===== */

.defensa {
  min-height: calc(100vh - 46px);
  background:
    radial-gradient(circle at top left, rgba(0, 76, 59, 0.08), transparent 30%),
    linear-gradient(135deg, #f8f6f0, #eee6d8);
  padding: 36px 40px 44px;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  gap: 24px;
}

.defensa-hero {
  max-width: 1100px;
}

.defensa-hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--uned-green-dark);
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1;
  margin: 10px 0 14px;
}

.defensa-hero p {
  font-size: 18px;
  line-height: 1.45;
  color: rgba(30, 41, 51, 0.76);
  max-width: 760px;
  margin-bottom: 18px;
}

.acciones-defensa {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.boton-secundario,
.boton-descarga {
  display: inline-block;
  text-decoration: none;
  font-weight: bold;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 14px;
}

.boton-secundario {
  color: var(--uned-green);
  border: 1px solid rgba(0, 76, 59, 0.3);
  background: rgba(255, 255, 255, 0.65);
}

.boton-descarga {
  color: var(--white);
  background: var(--uned-green);
}

.boton-secundario:hover,
.boton-descarga:hover {
  background: var(--uned-green-dark);
  color: var(--white);
}

.visor-diapositivas {
  flex: 1;
  min-height: 0;

  background: #cfc3ad;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(70, 55, 35, 0.22);

  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.24),
    0 8px 18px rgba(0, 0, 0, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.iframe-diapositivas {
  width: 100%;
  height: calc(100vh - 250px);
  min-height: 520px;
  border: none;
  display: block;
  border-radius: 10px;
  background: white;

  box-shadow:
    0 0 0 1px rgba(0, 76, 59, 0.12),
    inset 10px 0 18px rgba(0, 0, 0, 0.04),
    inset -10px 0 18px rgba(0, 0, 0, 0.035);
}

@media (max-width: 700px) {
  .defensa {
    padding: 28px 20px 36px;
  }

  .iframe-diapositivas {
    height: 70vh;
    min-height: 420px;
  }
}