/* styles.css */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    line-height: 1.2;
    font-size: 1.2rem; /* Tamaño por defecto para escritorio */
}

@media (min-width: 1024px) {
  .menu {
    width: 60%;
    max-width: 500px;
    right: 0; 
    left: auto;
    margin-left: auto;
    border-radius: 8px 0 0 8px;
    box-shadow: -4px 0 10px rgba(0, 0, 0, 0.3);
  }
}

@media (max-width: 768px) {
    body {
      font-size: 1rem;
    }
    .menu ul {
      display: flex;
      flex-direction: column;
    }
    #mensaje-actualizacion {
      bottom: 10px;
      right: 10px;
      left: 10px;
      max-width: none;
      text-align: center;
      font-size: 12px;
      padding: 8px 12px;
    }
    main {
      max-width: 100%;
      width: 100%;
      margin: 0;
      padding: 5.5rem 8px 1.5rem;
      box-sizing: border-box;
    }
}

@media screen and (max-width: 600px) {
    .menu ul {
        display: flex;
        flex-direction: column;
    }
    body {
      font-size: 0.8rem;
    }
}

@media only screen and (max-width: 480px) {
    body {
      font-size: 0.7rem;
    }
    .menu ul {
        display: flex;
        flex-direction: column;
    }
}


header {
    background-color: #222;
    color: #fff;
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
}

.nav-container {
    padding: 0.5rem 1rem;
}

nav {
    background-color: #222;
  }

nav:not(.menu) ul {
  list-style: none;
  padding-left: 1rem;
  margin: 0;
  display: none;
}

nav ul.visible {
    display: block;
}

nav li {
    margin: 0.3rem 0;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-block;
}

nav .has-children > a::after {
    content: " ▶";
    font-size: 0.8rem;
}

nav .expanded > a::after {
    content: " ▼";
}

main {
    padding: 6rem 1rem 2rem;
    max-width: 1200px;
    margin: auto;
}

.menu-toggle {
    position: fixed;
    top: 0.5rem;
    right: 0.5rem;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    cursor: pointer;
    z-index: 2000;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
  }

  .menu-toggle.open {
    background-color: #c0392b;
    /*transform: rotate(90deg);*/
  }
  
  .menu {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    width: 100vw;
    max-height: 90vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(30, 30, 30, 0.6);
    color: white;
    display: none;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-100%);
    transition: all 0.3s ease;
    padding-top: 2.2rem;
  }
  
  .menu.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
  }
  
  .menu ul {
    list-style: none;
    margin: 0;
    padding: 0.5rem 1rem;
  }
  
  .menu li {
    margin: 0.25rem 0;
  }
  
  .menu a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 0.4rem 0.6rem;
    font-size: 0.95rem;
    cursor: pointer;
  }
  
  .submenu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .submenu-header > a {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .submenu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    padding-left: 0.5rem;
    flex: 0 0 auto;
  }

  .submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: rgba(50, 50, 50, 0.7);
    margin-left: 1rem;
    border-left: 2px solid #666;
  }

  /* Submenús del primer nivel */
  .menu > ul > li.has-submenu.open > .submenu {
    max-height: 500px;
    overflow-y: auto;
  }
  
 /* Submenús anidados (cualquier profundidad) */
  .has-submenu.open > .submenu {
   max-height: 500px;
   overflow-y: auto;
  }

  .submenu a {
    font-size: 0.9rem;
    padding: 0.35rem 0.6rem;
  }


.menu::-webkit-scrollbar,
.submenu::-webkit-scrollbar {
  width: 6px;
}
.menu::-webkit-scrollbar-thumb,
.submenu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

article {
 padding: 0.5rem 0.5rem;
}

p {
 text-align: justify;
}

p.sang_2 {
  /*margin-left: 1em;*/
  text-indent: -2em;     /* mueve el número hacia la izquierda */
  padding-left: 2em;     /* deja espacio antes del texto */
  text-align: justify;
}

p.sang_2s {
  margin-left: 2em;
}

p.sang_3 {
  /*margin-left: 2em;*/
  text-indent: -2.9em;     /* mueve el número hacia la izquierda */
  padding-left: 5em;     /* deja espacio antes del texto */
  text-align: justify;
}

p.sang_3s {
  margin-left: 5em;
}

p.sang_4 {
  margin-left: 3em;
}

p.verde {
  color: #009740;   
}

.verde2 {
  color: #009740;
  text-justify: justify;
}

.verde_sang_3 {
  color: #009740;
  margin-left: 2em;
}

.verde_sang_4 {
  color: #009740;
  margin-left: 3em;
}

.sang_2_2{
  margin-left: 1em;
}

.sang_3_2{
  margin-left: 3em;
}

.centrado{
  text-align: center;
}

#mensaje-actualizacion {
  position: fixed;
  bottom: 15px;
  right: 10px;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  z-index: 9999;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  max-width: 220px;
  line-height: 1.3;
}

