@import url('https://fonts.googleapis.com/css?family=Playfair+Display&display=swap');
@import url('https://fonts.googleapis.com/css?family=Roboto+Slab:300,400,700&display=swap&subset=latin-ext');

:root {
    --adnote: rgba(128, 174, 253, 0.4);
    --adteorema: rgba(0,0,200, .5);
    --addef: rgba(200, 0, 0, .5);
    --adalgo: rgba(60, 60, 60, 0.4);
    --addemo: rgba(100, 100, 100, 0.4);
    --adside: rgba(165, 165, 165, 0.5);
    --adnoteright: rgba(120, 120, 120, 0.4);
    --adbackground: rgba(150, 150, 150, .15);
    --adbackgroundlight: rgba(220, 220, 220, 0.15);
    --adejemplo: rgba(0, 200, 0, 0.5);
    --adatencion: rgba(255,145,0,.4);
  }

body#md {
    position: absolute;
    /* font-family: "PT Serif", "Roboto Slab", "Helvetica Neue", Helvetica, Arial, sans-serif; */
    text-align: justify;
    margin: 0px 40px;
    padding: 0;
    max-width: 73%;
    color: #333;
    font-size: 18px;
    font-weight: 200;
    line-height: 165%;
    padding-right: 20px;
    overflow-x: hidden;
    text-overflow: ellipses;
}

/* if screen is wide enough, put table of contents on the right side */
@media screen and (min-width: 60em) {
	.md .longTOC, .md .mediumTOC, .md .shortTOC {
		max-width: 20%;
		width: 20%; 
		float: right;
		position: fixed;
		right: 0px;
		top: 80px;
	}
}
/* for narrow screens or print, hide table of contents */
@media screen and (max-width: 60em) {
	.md .longTOC { display: none; }
    /*.md .mediumTOC, .md .shortTOC { }*/
	body { max-width: 100%; }
}
@media print {
	.md .longTOC, .md .mediumTOC, .md .shortTOC { display: none; }
	body { max-width: 100%; }
}

.md .longTOC {
    width: 210px;
    display: block;
    border-right: 2px solid #ddd;
    overflow-y:scroll;
    font-size: 15px;
    font-family: inherit;
    background: #FFF;
    
    position: absolute;
    top: 90px;
    left:-190px;
    bottom:0px;
    margin: 0px;
    padding: 0px;
}

.scrolled .md .longTOC {
    position: fixed;
    left: 0px;
    top: 0px;
    border-left: 10px solid #fff; 
}


/* no numbering of headings */
.md h1:before, .md h2:before, .md h3:before, .md h4:before, .md h5:before, .md h6:before { content: none; }

.md .longTOC a {
    color: #000;
}

.md .tocHeader, .md .tocNumber {
    display: none;
}

.md a,
.md div.title, contents, .md .tocHeader,
.md h1, .md h2, .md h3, .md h4, .md h5, .md h6,
.md .nonumberh1, .md .nonumberh2, .md .nonumberh3, .md .nonumberh4, .md .nonumberh5, .md .nonumberh6,
.md .shortTOC, .md .mediumTOC, .md .longTOC {
    font-family: inherit;
}


.md h1, .md h2, .md h3, .md h4 {
    /*font-family: "PT Serif", "Roboto Slab", "Helvetica Neue", Helvetica, Arial, sans-serif;*/
    font-weight: 800;
}

.md h1, .md h2, .md h3, .md h4, .md h5, .md h6 {
    border: none;
}

.md h1 {
    font-size: 18px;
    text-transform: uppercase;
    color: #6aa84f;
    padding-bottom: 8px;
}
.md h2 {
    font-size: 16px;
    text-transform: uppercase;
    color: #6aa84f;
    font-weight: 200;
}
.md h3 {
    font-size: 15px;
    color: #999;
    font-weight: 200;
    font-style: italic;
}



/* Drop caps 
.md p:nth-of-type(3):first-letter {
    font-size: 54px;
    float: left;
    margin-top: .2em;
    margin-right: .07em;
    font-family: "Playfair Display", serif;
}
*/

.md div.title {
    font-family: "Playfair Display", serif;
    text-align: left;
    position: fixed;
    top: -14px;
    left:-0px;
    right: 0px;
    font-weight: 900;
    padding: 10px 10px;
    color: #fff;
    font-size: 45px;
    z-index: 1000;
    background-color: #6aa84f;
    /*background:  linear-gradient(90deg, #6aa84f 0%, #444 90%);*/
    /*border-bottom: 2px solid #ddd;*/
    /*border-right: 10px solid #444;*/  
}


.md div.subtitle {
    margin-top: 10px;
    font-weight: 200;
    font-size: 18px;
    line-height: 120%;
    color: #999;
    text-align: left;
    font-style: italic;
}

.md div.subtitle:nth-of-type(2) {
    margin-top: 100px;
    font-weight: bold;
    font-size: 30px;
    font-style: normal;
    color: #000;
}

.md div.mediumTOC center b {
    display: none;
}

.md div.mediumTOC p {
    margin-top: -16px;
}

/* custom Admonition-style "note", "warn", "def" blocks */
.md .note, .md .warn, .md .def, .md .alg, .md .teorema, .md .note-right, .md .ejemplo, .md .demo, .md .att {
    position: relative;
    margin: 1rem 0;
    padding: .4rem 0.8rem;
    border-radius: .2rem;
  }
  
  .md .note {
    border-left: 0.5rem solid var(--adnote);
    background-color: var(--adbackgroundlight);
  }
  
  .md .teorema {
    border-left: 0.5rem solid var(--adteorema);
    background-color: var(--adbackground);
  }
  
  .md .teorema >.admonition-title{
    border-color: var(--adteorema);
  }
  
  .md .att {
    border-left: 0.5rem solid var(--adatencion);
    background-color: var(--adbackground);
  }
  
  .md .att >.admonition-title{
    border-color: var(--adatencion);
  }
  
  .md .note-right {
    position:relative;
    width:fit-content;
    margin-top: 1em;
    margin-bottom: 1em;
    margin-left: auto;
    margin-right: 0;
    padding: .4rem 0.8rem;
    border-radius: .2rem;
    border-left: 0.5rem solid var(--adnoteright);
    background-color: var(--adbackground);
  }
  
  .md .note-right >.admonition-title{
    border-color: var(--adnoteright);
  }
  
  .md .warn {
    border-left: 0.5rem solid rgba(255,145,0,.4);
    background-color: rgba(255,145,0,.15);
  }
  
  .md .def {
    border-left: 0.5rem solid var(--addef);
    background-color: var(--adbackground);
  }
  
  .md .def >.admonition-title{
    border-color: var(--addef);
  }
  
  .md .ejemplo {
    border-left: 0.5rem solid var(--adejemplo);
    background-color: var(--adbackground);
  }
  
  .md .ejemplo >.admonition-title{
    border-color: var(--adejemplo);
  }
  
  .md .alg {
    border-left: 0.5rem solid var(--adalgo);
    background-color: var(--adbackground);
  }
  
  .md .alg >.admonition-title{
    border-color: var(--adalgo);
  }
  
  .md .demo {
    border-left: 0.5rem solid var(--addemo);
    background-color: var(--adbackgroundlight);
  }
  
  .md .demo >.admonition-title{
    border-color: var(--addemo);
  }
  
  .md .side {
    display: inline;
    z-index: 100;
    border-radius: 0px;
    border-left: 1px solid lightgrey;
    /*border-right: 2rem solid rgba(100,100,100,.1);*/
    background-color: white;
    /*border: 1px;*/
    float: right;
    clear: right;
    margin-right: -30%;
    width: 25%;
    margin-top: 0;
    margin-bottom: 0;
    font-size: 0.6rem;
    line-height: 1.2;
    vertical-align: baseline;
    position: relative;
    transition: transform 500ms;
  }
  
  .md .side >.admonition-title{
    border-color: var(--adside);
  }
  
  .md .side:hover{
    /*background-color: rgba(240, 240, 240, 1);*/
    background-color: rgba(240, 240, 240, 1);
    transition: all 1s ease;
    transform: scale(1.5) translateX(-80%);
  }

.md li {
    text-align: justify;
    width: 95%;
}

img {
    margin: 15px;
}

/* inline and block code */
.md pre.listing {
	background-color: rgba(0,0,0,.05);
	padding: 0em 1em;
	border-radius: 0.15em;
}
.md pre.listing code {
	background-color: transparent;
	padding: 0;
	border: none;
}

.md div.mediumTOC {
  position: fixed;
  border-left: 1.1rem solid rgba(180, 180, 180);
	border-radius:3px;
  font-size: 14px;
  line-height: 135%;
  left: -1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 350px; /* Ancho completo del TOC */
  height: auto;
  background: rgba(240, 240, 240); /* Color de fondo del TOC */
  overflow: hidden;
  clip-path: inset(0 95% 0 0); /* Oculta el TOC parcialmente a la derecha */
  transition: clip-path 0.3s ease;
  z-index: 1000;
}

.md div.mediumTOC:hover {
  clip-path: inset(0 0 0 0); /* Muestra el TOC completo al hacer hover */
}

.md div.mediumTOC .toc-content {
  padding: 10px;
  width: 100%;
  height: 100%;
}

summary {
  list-style-type: '↳ ';
} 

details[open] > summary {
  list-style-type: '↰ ';
}
