/* Reset básico YKJGJKH */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  height: auto;
  font-family: 'Myriad Pro', sans-serif;
  background-color: #f9f9f9;
  color: #333;
  line-height: 1.6;
  padding: 20px;
}

/* HEADER */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background: url('pics/bordado2.png') no-repeat center center;
  background-size: cover;
  background-color: #732353;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  display: none !important;
}

.header-text {
  font-size: 1.2em;
  color: #fff;
}

.header img {
  max-width: 500px;
  height: auto;
}

/* WRAPPER */
.wrapper {
  display: flex;
  justify-content: center;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 20px;
  gap: 0;
}

/* BOTÓN TOC SIEMPRE VISIBLE */
#toggle-toc {
  display: block;
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 10000;
  background-color: #6A2687;
  color: white;
  padding: 10px 15px;
  font-size: 1.2em;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* MENU LATERAL (SIEMPRE REPLEGADO POR DEFECTO) */
.toc {
  position: fixed;
  top: 0;
  left: 0;
  width: 80%;
  max-width: 280px;
  height: 100vh;
  background-color: #ffffff;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 9999;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
  padding: 20px;
  overflow-y: auto;
}

.toc.expanded {
  transform: translateX(0);
}

/* TOC CONTENIDO */
.toc h2 {
  color: #463739;
  font-size: 1.2em;
  font-weight: 200;
  margin-bottom: 10px;
  padding-bottom: 5px;
}

.toc ul {
  list-style: none;
  padding-left: 0;
}

.toc li {
  margin-bottom: 10px;
  position: relative;
}

.toc a {
  text-decoration: none;
  color: #463739;
  display: block;
  padding: 6px 12px;
  border-radius: 4px;
  transition: background-color 0.3s, color 0.3s;
  font-weight: 500;
}

.toc a:hover {
  background: linear-gradient(90deg, #FFCD70 0%, #FDB514 100%);
  color: #463739;
}

.toc a.active {
  background-color: #EF343F;
  color: #fff;
  font-weight: bold;
}

/* SUBMENÚS */
.toc ul ul {
  height: 0;
  overflow: hidden;
  transition: height 0.3s ease;
  background: linear-gradient(90deg, #7A6D6F 0%, #463739 100%);
  border-left: 3px solid #463739;
  padding-left: 10px;
  margin-top: 5px;
}

.toc li:hover > ul {
  height: auto;
  padding-top: 5px;
  padding-bottom: 5px;
}

.toc ul ul a {
  color: white;
  font-size: 0.95em;
}

.toc ul ul a:hover {
  background: #F48371;
  color: white;
}

/* CONTENIDO */
.content {
  flex: 1;
  max-width: 800px;
  padding: 20px;
  margin: 0 auto;
}

/* CONTAINER */
.container {
  background-color: #fff;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* TITULOS */
h1, h2, h3, h4, h5, h6 {
  font-size: 0.95em;
  color: #732353;
  font-family: 'Myriad Pro Light', sans-serif;
  margin-bottom: 15px;
  text-align: left;
  cursor: pointer;
  scroll-margin-top: 70px;
}

h1 {
  font-size: 2em;
  color: #b0003a;
  text-align: center;
  font-weight: bold;
}

h2 {
  font-size: 1.5em;
  color: white;
  text-align: center;
  font-weight: normal;
}

h3 {
  font-size: 1.4em;
  color: #732353;
  font-family: 'Myriad Pro Bold', sans-serif;
}

h4 {
  padding-left: 20px;
  font-size: 1.2em;
  color: #9068A7;
}

h5 {
  padding-left: 30px;
  font-size: 1.05em;
  color: #b0003a;
}

h6 {
  padding-left: 40px;
  font-size: 1em;
  color: #0071BB;
}

/* TEXTO */
p {
  margin-bottom: 20px;
  text-align: justify;
  font-family: 'Myriad Pro Light', sans-serif;
  font-size: 1em;
  color: #333;
}

/* HR */
hr {
  border: 1px solid #463739;
  margin: 20px 0;
}

/* BLOQUES */
blockquote {
  border-left: 4px solid #007BFF;
  padding-left: 15px;
  margin: 20px 0;
  font-style: italic;
  color: #007BFF;
  font-family: 'Myriad Pro Light Italic', sans-serif;
  font-size: 0.95em;
}

/* TABLAS */
table {
  margin: 20px auto;
  border-collapse: collapse;
  width: 90%;
}

th, td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: center;
}

thead {
  background-color: #f2f2f2;
}

tfoot {
  background-color: #f9f9f9;
  font-weight: bold;
}

/* IMAGENES */
img {
  display: block;
  width: 100%;
  max-width: 900px;
  height: auto;
  margin: 0 auto 20px;
}

/* LISTA DECORADA */
.lista-decorada {
  margin: 1em 0 1em 2em;
  padding-left: 0;
  list-style: none;
  font-family: 'Myriad Pro Light', sans-serif;
  font-size: 1em;
  color: #463739;
}

.lista-decorada li {
  margin-bottom: 10px;
  position: relative;
  padding-left: 20px;
  text-align: justify;
}

.lista-decorada li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #6A2687;
  font-size: 1.2em;
  line-height: 1;
}

/* SIDEBAR DERECHO */
.right-sidebar {
  background-color: #fff;
  color: #463739;
  padding: 20px;
  border: 1px solid #ddd;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  position: fixed;
  top: 60px;
  right: 0;
  width: 250px;
}

.right-sidebar h2 {
  font-weight: bold;
  margin-bottom: 10px;
  text-align: left;
  font-size: 1.2em;
}

.right-sidebar a {
  text-decoration: none;
  color: #463739;
}

.right-sidebar a:hover {
  text-decoration: underline;
}

/* BOTÓN TOGGLE RIGHT */
#toggle-right-sidebar {
  display: none;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1100;
  color: #fff;
  border: none;
  padding: 10px;
  font-size: 1.5em;
  border-radius: 3px;
  cursor: pointer;
}


/* Ajustes para móviles */
@media (max-width: 768px) {
  .wrapper {
    flex-direction: column;
    padding: 0 10px;
    margin-top: 0;
  }

  .toc {
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 280px;
    height: 100vh;
    background-color: #ffffff;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 9999;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
    padding: 20px;
    overflow-y: auto;
  }

  .toc.expanded {
    transform: translateX(0);
  }

  #toggle-toc {
    display: block;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 10000;
    background-color: #6A2687;
    color: white;
    padding: 10px 15px;
    font-size: 1.2em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  }

  .content {
    margin-left: 0;
    margin-right: 0;
    padding-top: 60px;
    padding-bottom: 30px;
    max-width: 100%;
  }

  .right-sidebar {
    display: none;
    /* Puedes ocultar o convertirlo también en menú móvil */
  }
}

/* Estilo personalizado solo para la clase .lista-decorada */
.lista-decorada {
  margin: 1em 0 1em 2em;
  padding-left: 0;
  list-style: none;
  /* 👈 Elimina la viñeta nativa */
  font-family: 'Myriad Pro Light', sans-serif;
  font-size: 1em;
  color: #463739;
  /* gris fuerte */
}

.lista-decorada li {
  margin-bottom: 10px;
  position: relative;
  padding-left: 20px;
  text-align: justify;
  /* 👈 Justifica el texto */
}

/* Puntos decorativos */
.lista-decorada li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #6A2687;
  /* morado fuerte */
  font-size: 1.2em;
  line-height: 1;
}
