
:root {
  --bg: #f6f4f0;
  --text: black;
  --nav-bg: #ffffff;
  --active-bd: red;
  --active-text: white;
}

:root[data-theme="dark"] {
  --bg: #121212;
  --text: #fff;
  --nav-bg: #373737;
  --active-bd: #6b0499;
  --active-text: #fff;
}

:root[data-theme="pink"] {
  --bg: #ff7ea8;
  --text: #fff;
  --nav-bg: #86d9e6;
  --active-bd: #ff0080;
  --active-text: #fff;
}


* {
    margin: 0;
    padding: 0;

}

body {
   padding-top: 50px !important; /* Añade espacio arriba */
  color: var(--text);
    font-family: Arial, sans-serif;
    line-height: 1.6;
  background-color:var(--bg);
padding-bottom:100px;
}

main{
     display: flex;
    flex-direction: column;  /* Organiza los elementos en columna */
    justify-content: center; /* Centra los elementos verticalmente */
    align-items: center;     /* Centra los elementos horizontalmente */
    width:60%;          /* Hace que el contenedor ocupe toda la altura de la pantalla */
    text-align: left;
    margin: 0 auto;  
    padding-top: 10px;
 
   
    
}

main *{

    max-width: 800px;        /* Limita el ancho del h1 y p */
    width: 100%;             /* Para asegurarse de que el ancho es del 100% del contenedor */

}

main ul{
    list-style-position: inside;
}
main p  {
     text-align: justify; 
}

.nav-bar {
 /*   position: absolute;*/
    position: fixed;
    top: 0;
   background-color:var(--nav-bg);
    right: 50px;
  
height: 40px;
  padding: 0px;

      
  
margin-bottom:10px;
  
    z-index: 1000;


    min-width: auto; /* <--- OCUPA MÁS ANCHO */



    border-radius: 0 0 10px 10px;



}

.nav-menu{
background-color: var(--nav-bg);
     display: flex; /* El menú ocupa solo el espacio necesario */

      list-style: none;

 
  justify-content: flex-start;
    width: 100%;
   flex-wrap: nowrap;

      border-radius: 0 0 10px 10px;
}

.nav-menu > li{
     display: inline-flex; /* Cambia a flex */
    margin: 0px;
    padding: 0px 5px;
     align-items: center; /* Centra verticalmente */
     height: 40px; /* Mismo alto que la barra */
    
}

.nav-menu >li>a {
    color: var(--text);
    text-decoration: none;
   padding: 12px 15px; /* Más padding vertical */
    
    font-weight: bold;
   white-space: nowrap !important;
}


.nav-menu > li:first-child {
   border-radius: 0 0 0 10px; 
}
.nav-menu > li:last-child {
  border-radius: 0 0 10px 0;

}
.nav-menu > li:hover {
    background-color: var(--active-bd);

}
.nav-menu > li:hover a {
  color: var(--active-text);
}

.nav-toggle {
    display: none; /* OCULTO POR DEFECTO */
}




/* SUBMENÚ PARA DESKTOP */
.has-submenu {
    position: relative;
}

.has-submenu .submenu-items {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--nav-bg);
    width: auto;
 
    z-index: 1001;

    padding: 0px 0; /* Menos padding */
}

/* Cambia el hover del submenú */
.submenu-items li:hover {
  background-color: var(--active-bd) !important;
}
.submenu-items li:hover a {
  color: var(--active-text) !important;
}

.has-submenu:hover .submenu-items {
    display: block;
}

.submenu-items li {
    display: block;
    padding: 0px;
    width: 100%;
   align-items: center; 
}

.submenu-items a {
    padding: 10px 10px;
    display: block;
   color: var(--text) !important;
  font-weight: bold;
}




.active{

  background-color: var(--active-bd);
  
}



.active >a{

color: var(--active-text) !important;
  
}


.div-primary{
   margin: 0 auto;
margin-top: 60px;
     max-width: 900px; /* Ancho máximo del div */
            width: 100%; /* Asegura que se adapte al tamaño disponible */
   text-align: left;
}

.div-primary ul{ 

list-style-type: disc; /* Usa puntos como decoración */
            list-style-position: inside; /* Alinea los puntos dentro del contenido */
            padding-left: 20px; /* Elimina el espaciado predeterminado a la izquierda */
            padding-top: 8px;
    padding-bottom: 8px;
    margin-left: 20px;
}




.div-primary p{

    text-align: justify; 
}

a{
text-decoration: none;
}


h1,h2,h3,h4,h5,h6,p{
    padding-top: 8px;
    padding-bottom: 8px;
}



.top-controls {
    position: fixed;
    top: 0px;
    left: 20px;
    display: flex;
    align-items: center;
   
    z-index: 1002;
    height: 40px;
    background: var(--nav-bg);
    padding: 0px;
    border-radius: 0 0 10px 10px;

}

.top-controls a {
  display: flex;           /* AÑADE ESTO */
    align-items: center;     /* AÑADE ESTO - centra vertical */
    justify-content: center; /* AÑADE ESTO - centra horizontal */
    padding: 0px 12px;
   border-radius:0 0 10px 0px;
    text-decoration: none;
    font-weight: bold;
    white-space: nowrap;
   color: var(--text);
  height: 100%; 
}
.top-controls a:hover {
    color: var(--active-text);
  background-color: var(--active-bd);
}



/* Selector de tema personalizado */
.theme-selector {
    position: relative;
    height: 100%;
}

.theme-button {
   font: inherit;
    height: 100%;
    padding: 0 15px;
    background-color: var(--nav-bg);
    color: var(--text);
    font-weight: bold;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    border-radius: 0 0 0 10px;
}

 

.theme-button:hover {
    background-color: var(--active-bd) !important;
    color: var(--active-text) !important;
}

.arrow {
    font-size: 10px;
}

.theme-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--nav-bg)  !important;
     color: var(--text)  !important;
    width: 100%;
    z-index: 1003;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
   /* box-shadow: 0 5px 15px rgba(0,0,0,0.2); */
}

.theme-options.show {
    display: block;
}

.theme-options button {

    width: 100%;
    padding: 12px 15px;

  
    font: inherit;
    font-weight: bold;
    border: none;
    text-align: left;
    cursor: pointer;
  background-color: inherit !important;
  color: inherit !important;

}

.theme-options button:hover {
    background-color: var(--active-bd) !important;
    color: var(--active-text) !important;
}

.theme-options button:last-child {
    border-bottom: none;
}



@media (max-width: 1068px) {
 /* BOTÓN HAMBURGUESA IZQUIERDA */
    .nav-toggle {
        display: block;
        position: fixed;
        top: 10px;
        left: 15px;
        background: none;
        border: none;
        font-size: 24px;
        color: var(--text);
        cursor: pointer;
        z-index: 1001;
    }
    
    /* BARRA COMPLETA EN MÓVIL */
    .nav-bar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 50px;
        background-color: var(--nav-bg);
        border-radius: 0;
    }
    
    /* MENÚ VERTICAL OCULTO */
    .nav-menu {
        display: none;
        position: fixed;
        top: 50px;
        left: 0;
        width: 100%;
        flex-direction: column;
        background-color: var(--nav-bg);
        border-radius: 0;
        z-index: 1000;
    }
    
    /* MOSTRAR MENÚ CUANDO ESTÁ ABIERTO */
    .nav-menu.open {
        display: flex;
    }
    
    .nav-menu li {
        padding: 12px 20px;
        width: 100%;
        display: block;
       border-radius: 0 !important;
    }

  .nav-menu li:first-child {
    border-radius: 0 !important;
}
.top-controls {
    position: fixed;
       left: auto;
    right: 20px !important;
}
    /* SUBMENÚ EN MÓVIL */
    .nav-menu .has-submenu .submenu-items {
        display: none;
       padding-left: 0;
    background-color: var(--nav-bg);
    width: 100%;
    }
    
    .nav-menu .has-submenu.open .submenu-items {
        display: block;
    }
    
    /* ESPACIO PARA EL CONTENIDO */
    body {
        padding-top: 70px;
    }
}
