/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  background: linear-gradient(#ffffff, #f7f6f6);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  color: #333;
  padding-top: 80px;
  min-height: 100vh;
  margin: 0;
}
/* Cabecera fija */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0; /* Asegura que el header se extienda hasta el borde derecho */
  width: 100%;
  background-color: rgba(240, 240, 240, 0.95);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  border-bottom: 1px solid #ccc;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  z-index: 1000;
}

header img {
  height: 50px;
  margin-right: 20px;
}
header h1 {
  font-size: 1.4em;
  color: #333;
}


nav ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}
nav li {
  margin-right: 20px;
}
nav li:last-child {
  margin-right: 0;
}
nav a {
  text-decoration: none;
  color: #000;
}
/* Estilo para el item activo */
nav a.active {
  color: rgb(0, 149, 255);
  font-weight: bold;
}
/* Contenedor principal */
main {
  margin-top: 60px;
  max-width: 1000px;
  margin: 20px auto;
  padding: 50px;
  background-color: rgb(250, 250, 250);
  box-shadow: 0 5px 12px rgba(0,0,0,0.2);
  border-radius: 8px;
}
/* Logo adicional */
.intro-logo {
  display: block;
  max-width: 200px;
  margin: 20px auto;
}
section {
  margin-bottom: 40px;
  animation: fadeIn 1s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

p {
  margin-bottom: 15px;
  text-align: justify;
}
ul {
  margin-left: 20px;
  margin-bottom: 15px;
}
blockquote {
  margin: 15px 20px;
  padding-left: 15px;
  border-left: 5px solid #ccc;
  background-color: #f4f4f4;
  font-style: italic;
  color: #555;
  
}


.final-message {
  text-align: center;
  font-weight: bold;
  color: #ff0202;
  font-size: 1.2em;
  margin-top: 30px;
}

.highlight {
  font-weight: bold;
}
/* Secciones desplegables */
.collapsible {
  border: 1px solid #39c0ff;
  border-radius: 8px;
  margin-bottom: 10px;
  box-shadow: 0 5px 12px rgba(0,0,0,0.2);
  overflow: hidden;
}
.collapsible-header {
  background-color: rgba(229, 235, 245, 1);
  padding: 10px;
  cursor: pointer;
  font-weight: bold;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.collapsible-content {
  max-height: 0px;
  overflow: hidden;
  transition: max-height 0.5s ease-out, padding 0.5s ease;
  padding: 0px 40px; 
}

.collapsible-content.open {
  max-height: 9999px;
  padding: 20px 40px;
  padding-bottom: 160px; 
}

.arrow {
  font-size: 1.2em;
  margin-left: 10px;
}
/* Estilos para el sistema de votación */
.container {
  width: 100%;
  max-width: 800px;
  margin: 20px auto;
  padding: 30px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 5px 12px rgba(0,0,0,0.2);
}
.vote-button {
  padding: 10px 20px;
  font-size: 18px;
  cursor: pointer;
  margin: 5px;
  border: none;
  border-radius: 4px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}
.vote-button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}
.vote-button:hover:not(:disabled) {
  transform: scale(1.05);
}
.vote-button:first-of-type {
  background-color: #4caf50;
  color: #fff;
}
.vote-button:last-of-type {
  background-color: #f44336;
  color: #fff;
}
.results {
  margin-top: 20px;
}
#human-check-container {
  margin: 20px 0;
}
#human-check-slider {
  width: 100%;
  max-width: 300px;
}
.honeypot {
  display: none;
}

/* Estilos para el botón de autenticación de Google */
#auth-button {
  background-color: #007BFF; /* Azul */
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 4px;
  animation: blink 1.5s infinite; /* Efecto blinking */
}

/* Definición de la animación de parpadeo */
@keyframes blink {
  0% { opacity: 1; }
  50% { opacity: 0.8; }
  100% { opacity: 1; }
}

#auth-button:hover {
  background-color: #0056b3; /* Azul un poco más oscuro al pasar el cursor */
}

/* Centrar el texto y aplicar un efecto de parpadeo */
#user-info-vote {
  text-align: center;
  font-weight: bold;
  animation: blinkingText 1.5s infinite;
}

@keyframes blinkingText {
  0% { opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 1; }
}

/* Sección del gráfico */
#chart-section {
  width: 100%;
  max-width: 800px;
  margin: 20px auto;
  padding: 30px;
  margin-bottom: 40px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 5px 12px rgba(0,0,0,0.2);
}


#chart-section label, #chart-section select {
  font-size: 1em;
  margin-bottom: 10px;
  display: inline-block;
}
#chart-section canvas {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
}
#monthTotals, #overallTotals {
  margin-top: 10px;
  font-weight: bold;
}
/* Footer */
footer {
  background-color: #555555;
  color: #ffffff;
  text-align: center;
  padding: 15px 20px;
  font-size: 0.9em;
  border-top: 1px solid #ccc;
  margin-top: 40px;
}
/* Responsive para móviles */
@media (max-width: 600px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }
  header img {
    margin-bottom: 10px;
  }
  header h1 {
    font-size: 1.2em;
  }
}
#comments-section {
  border: 1px solid rgb(195, 194, 194);
  padding: 20px;
  background: #fff;
  margin: 20px;
  border-radius: 8px;
  box-shadow: 0 5px 12px rgba(0,0,0,0.2);
}

#comment-form textarea {
  width: 100%;
  height: 100px;
}
.comment {
  border-bottom: 1px solid #ddd;
  padding: 10px 0;
}
.comment:last-child {
  border-bottom: none;
}
.comment-button {
  padding: 10px 20px;
  font-size: 18px;
  cursor: pointer;
  margin-top: 10px;
  margin-bottom: 20px;
  border: none;
  border-radius: 4px;
  background-color: #2196F3;
  color: #fff;
  transition: background-color 0.3s ease, transform 0.2s ease;
}
.comment-button:hover {
  transform: scale(1.05);
}

/* Contenedor general de compartir */
.share-panel {
  text-align: center;
  margin-bottom: 40px;
  padding: 20px;
  border: 1px solid #fb0404;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 5px 12px rgba(0,0,0,0.2);
}
.share-panel h2 {
  margin-bottom: 15px;
}
.share-panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.share-panel li {
  margin-bottom: 15px;
  position: relative;
}
/* Botones de compartir */
.share-btn {
  background-color: #007bff;
  color: #fff;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  width: 150px; /* Ancho fijo para todos */
}

/* Panel común para el texto con transición */

#common-text-panel {
  width: 100%;
  margin: 10px auto 35px; /* 35px de margen inferior */
  background: #f9f9f9;
  border: 1px solid #ddd;
  padding: 15px;
  padding-bottom: 20px; /* Padding extra para la última línea */
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.5s ease-out, opacity 0.5s ease-out;
}
/* Área de texto */
#common-text-panel textarea {
  width: 100%;
  min-height: 100px;
  padding: 20px;
  padding-bottom: 20px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
  overflow: hidden;
  box-sizing: border-box;
}
/* Botón de reenviar */
.send-btn {
  background-color: #28a745;
  color: #fff;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 10px;
  font-size: 16px;
}

#enrichedText {
  text-align: left;
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 10px;
  background: #fff;
}




/* Cada criterio como un bloque colapsable */
.criterion-block {
  border: 1px solid #ccc;
  margin-bottom: 200px;
  border-radius: 4px;
  background: #fafafa;
}

/* Cabecera del criterio */
.criterion-header {
  background: #eee;
  padding: 10px;
  cursor: pointer;
  font-weight: bold;
  border-radius: 4px 4px 0 0;
}
.criterion-header:hover {
  background: #ddd;
}

/* Contenido colapsable */
.criterion-content {
  display: block;
  max-height: 1000px;               /* oculto por defecto */
  overflow: hidden;
  padding: 0 10px;            /* algo de padding horizontal */
  padding-bottom: 10px;  
}


/* Resumen y lista de países dentro del contenido */
.criterion-summary {
  margin-top: 10px;
  margin-bottom: 10px;
}

/* Lista de países en filas (wrap) */
.countries-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  background: #fff;
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 4px;
}

#country-container {
  display: none;
  background: #e8f0fe; /* Fondo diferenciado */
  padding: 20px;
  margin-top: 20px;
  border: 1px solid #ccc;
  border-radius: 4px;
}


.country-container-ajax {
  display: none; /* Oculto por defecto */
  padding-bottom: 50px;
  width: 90% !important;
  margin: 10px auto; /* Margen de 10px arriba/abajo y centrado horizontalmente */
  padding: 20px;
  box-sizing: border-box;
  background: #e8f0fe;
  border: 1px solid #ccc;
  border-radius: 4px;
}





.load-country {
  cursor: pointer;
  padding: 10px 15px;
  border: none;
  background: #007bff;
  color: #fff;
  border-radius: 4px;
  margin: 5px;
}
.load-country:hover {
  background: #0056b3;
}
.country {
  background: #eee;
  padding: 8px;
  border-radius: 4px;
  text-align: center;
  font-weight: bold;
  flex: 0 0 150px;
  cursor: pointer;
  text-decoration: none;
  color: #333;
}
.country:hover {
  background: #ddd;
}

.country-title {
  color: rgb(0, 106, 255);
  position: relative;
  display: inline-block;
}

.country-flag {
  margin-left: 30px; 
  vertical-align: middle; /* o bottom, según prefieras */
}

h3 {
  color: rgb(0, 106, 255);
}
h2 {
  color: rgb(0, 106, 255);
}
h1 {
  color: rgb(0, 106, 255);
}

/* Contenedor de la cabecera AJAX (título, imagen y botón cerrar) */
.ajax-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #ccc;
  margin-bottom: 10px;
  padding-bottom: 5px;
}
.ajax-header .title-wrapper {
  display: flex;
  align-items: center;
}
.ajax-header h1 {
  margin: 0;
  font-size: 1.8em;
}
.ajax-header img {
  width: 60px;
  margin-left: 10px;
}
#close-ajax {
  font-size: 1.2em;
  cursor: pointer;
  text-decoration: none;
  color: #007bff;
}
#close-ajax:hover {
  color: #0056b3;
}

.futuro {
  width: 100%;
  max-width: 800px;
  margin: 20px auto;
  padding: 30px;
  color: #007bff;
  font-weight: bold;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 5px 12px rgba(0,0,0,0.2);
}

.avales {
  color: red;
  font-weight: bold;
}




