/* Estilos generales */
body {
    font-family: "Libre Baskerville", sans-serif;
    margin: 0;
    padding: 0;
  }
  
  /* Media query para pantallas grandes */
  @media screen and (min-width: 1200px) {
    body {
      margin: 0 30vh; /* Margen para pantallas grandes */
    }
  }
  
  /* Media query para pantallas medianas */
  @media screen and (min-width: 768px) and (max-width: 1199px) {
    body {
      margin: 0 5vh; /* Margen para pantallas medianas */
    }
  }
  
  /* Media query para pantallas pequeñas */
  @media screen and (max-width: 767px) {
    body {
      margin: 0 1vh; /* Margen para pantallas pequeñas */
    }
}
  
  header {
    text-align: center;
    padding: 30px;
    margin-bottom: 7vh;
  }
  
  h1 {
    font-size: 36px;
    margin-bottom: 40px;
    color: #00006b;
  }
  
  #subtitulo {
    font-size: 18px;
    font-style: italic;
    margin-bottom: 10px;
  }
  
  main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px; /* Agregado: padding para el contenido principal en pantallas más pequeñas */
  }
  
  section {
    margin-bottom: 20px;
    padding: 10px;
  }
  
  #metodologia {
    line-height: 2;
}
  
  body #main section #svg {
    padding: 0;
    margin: 0;
  }
  
  h2 {
    font-size: 24px;
    margin: 30px;
  }
  .cita {
    font-family: "Libre Baskerville", serif;
    font-size: 1.1rem;
    line-height: 2;
    color: black;
    font-style: regular;
    border-left: 1px solid grey;  /* Filete gris arriba */
    padding-left: 10px;  /* Espacio entre el texto y el filete superior */
}

.advertencia {
  font-family: "Libre Baskerville", serif;
    font-size: 0.8rem;
    line-height: 1.9;
    font-style: italic;
    border-top: 1px solid grey;  /* Filete gris arriba */
    border-bottom: 1px solid grey;  /* Filete gris abajo */
    padding-top: 10px;  /* Espacio entre el texto y el filete superior */
    padding-bottom: 10px;  /* Espacio entre el texto y el filete inferior */
}

@media (min-width: 768px) {
    .cita {
        margin-left: 5%;
        margin-right: 20%;
        line-height: 2.3;
    }
}
  
  p {
    font-size: 1.1rem; /* Tamaño de fuente base */
    line-height: 2;
    color: rgba(0, 0, 0, 0.85);
  }
  
  @media (max-width: 1200px) {
    p {
      font-size: 1rem; /* Disminuir un poco el tamaño de la fuente para pantallas más pequeñas */
      line-height: 2;
    }
  }
  
  @media (max-width: 992px) {
    p {
      font-size: 1rem; /* Disminuir más el tamaño de la fuente para tablets y pantallas pequeñas */
      line-height: 1.6;
    }
  }
  
  @media (max-width: 768px) {
    p {
      font-size: 1rem; /* Tamaño de fuente más pequeño para móviles */
      line-height: 1.6;
    }
  }
  
  @media (max-width: 576px) {
    p {
      font-size: 1.1rem; /* Tamaño de fuente más pequeño para móviles más pequeños */
      line-height: 1.6;
    }
    main {
      margin: 0 auto;
      padding: 0; /* Agregado: padding para el contenido principal en pantallas más pequeñas */
    }
  }
  
  footer {
    background-color: #f2f2f2;
    padding: 20px;
    text-align: center;
    font-size: 14px;
  }
  
  /*Pelata de colores principal*/
  .color1 { color: #f9d423; }
  .color2 { color: #ede574; }
  .color3 { color: #e1f5c4; }
  .color4 { color: #add6bc; }
  .color5 { color: #79b7b4; }
  
  /* Estilos para la imagen principal */
  .imagen-principal {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    margin-bottom: 20px;
  }
  
  @media screen and (max-width: 600px) {
    .imagen-principal {
      width: 100%; /* Modificado: ajustar el ancho al 100% en pantallas pequeñas */
      height: auto;
      max-height: 400px;
      margin: 0;
      padding: 0;
    }
  }
  
  /* Estilos para el gráfico D3 */
.chart-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  /* Media query para pantallas pequeñas */
  @media screen and (max-width: 767px) {
    .chart-calendar  {
      overflow-x: auto;
      overflow-y: hidden;
      white-space: nowrap;
      max-width: 100%; /* Asegura que el contenedor no se desborde en el eje x */
  
    }
  }
  .chart-wrapper {
    width: 100%;
    height: auto;
  }
  
  .grafico-d3 {
    margin: 0;
    width: 100%;
    height: 100%;
  }
  
  select {
    margin: 10px;
  }
  
  svg {
    width: 100%;
    height: auto;
  }
  
  svg#calendar {
    width: 100%;
    height: auto;
    max-height: 400px;
  }
  
  .calendar {
    width: 100%;
    height: auto;
    max-height: 400px;
  }
  
  /* Media query para pantallas grandes */
  @media screen and (min-width: 1200px) {
    .grafico-d3 {
      margin: 0;
    }
  
    svg {
      min-height: 700px;
      width: 100%;
    }
  
    svg#calendar {
      min-height: 400px;
      min-width: 950px;
    }
  
    .calendar {
      min-height: 400px;
    }
  }
  
  /* Media query para pantallas medianas */
  @media screen and (min-width: 768px) and (max-width: 1199px) {
    .grafico-d3 {
      margin: 0;
    }
  
    svg {
      min-height: 500px;
    }
  
    svg#calendar {
      min-height: 300px;
      min-width: 950px;
}
    }
  
    .calendar {
      min-height: 300px;
    }
  
  /* Media query para pantallas pequeñas */
  @media screen and (max-width: 767px) {
    .grafico-d3 {
      margin: 0;
  
    }
  
    svg {
      min-height: 700px;
      max-width: none;
    }
  
    svg#calendar {
      min-height: 300px;
    }
  
    .calendar {
      min-height: 300px;
      text-align: center;
      overflow-x: auto;
    }
  }
  .pie_grafico {
    font-size: 12px;
    font-style: italic;
    text-align: center; /* Alinea el texto del pie de gráfico al centro */
}
  
  /* Estilos para la nube de palabras */
  #wordcloud-container {
    width: 100%;
    height: auto; /* Modificado: ajustar la altura automáticamente */
    max-height: 400px; /* Agregado: establecer una altura máxima para la nube de palabras */
    margin-bottom: 20px;
  }

/* Estilos para el tooltip */
.tooltip {
    position: absolute;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    font-size: 12px;
    pointer-events: none;
    line-height: 1.6;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }

  /*Animaciones*/
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.fade-in.active {
  opacity: 1;
  transform: translateY(-20px);
  transition: opacity 0.5s ease-in, transform 0.5s ease-in;
}

/*Animación subrayado texto*/

mark {
  font-weight: normal;
  text-decoration: none;
  background-color: rgba(0, 0, 0, 0);
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0) 50%, #79b7b4 50%);
  background-position: 0% 0;
  background-size: 200% auto;
  position: relative;
  will-change:background-position
}

mark.active {
  transition: background-position 1s cubic-bezier(1, 0, 0.2, 1);
  transition-delay: 0s;
  background-position:-99.99% 0
}

mark.amarillo {
  font-weight: normal;
  text-decoration: none;
  background-color: rgba(0, 0, 0, 0);
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0) 50%,  #ede574 50%);
  background-position: 0% 0;
  background-size: 200% auto;
  position: relative;
  will-change:background-position
}

mark.amarillo.active {
  transition: background-position 1s cubic-bezier(1, 0, 0.2, 1);
  transition-delay: 0s;
  background-position:-99.99% 0
}

mark.lila {
  font-weight: normal;
  text-decoration: none;
  background-color: rgba(0, 0, 0, 0);
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0) 50%, rgba(143, 86, 141, 0.8) 50%);
  background-position: 0% 0;
  background-size: 200% auto;
  position: relative;
  will-change:background-position
}

mark.lila.active {
  transition: background-position 1s cubic-bezier(1, 0, 0.2, 1);
  transition-delay: 0s;
  background-position:-99.99% 0
}
