:root {
  --poliglota-green: #19a572; /* Verde Políglota */
  --secondary-color: #555555; /* Gris Oscuro para textos y elementos secundarios */
  --light-gray: #f7f7f7;
  --white: #ffffff;
  --border-color: #ddd;
  --button-hover: #147a4e; /* Verde más oscuro para hover */
  --font-primary: 'Montserrat', sans-serif;
}

body {
  font-family: var(--font-primary);
  margin: 0;
  background-color: var(--white);
}

h1 {
  text-align: center;
  color: var(--poliglota-green);
  margin-bottom: 0px;
  font-size: 1.4rem; /* Reducido */
}

.subtitle {
  text-align: center;
  color: var(--secondary-color);
  margin-bottom: 20px; /* Reducido de 30px a 20px */
  font-size: 0.9rem; /* Reducido */
  font-weight: 300;
  margin-bottom: 20px;
}

.options-panel-title {
  font-size: 1.1rem;
  color: var(--secondary-color);
  margin: 0;
  margin-bottom: 20px;
  font-weight: 700;
}

.container {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  max-width: 1000px; /* Reducido de 1200px a 1000px */
  margin: 0 auto;
  justify-content: center;
  margin-top: 20px;
}

.options-panel {
  flex: 1 1 250px;
  display: flex;
  flex-direction: column;
  max-width: 300px;
  background-color: var(--white);
  padding: 30px 20px;
  padding-bottom: 10px; 
  border-radius: 8px; /* Reducido de 10px a 8px */
  box-shadow: 0px 5px 10px rgba(0,0,0,0.2); /* Más sutil */
  align-self: start;
}

.chart-result {
  width: 550px;
  flex-direction: column;
  padding: 10px;
}

.form-group {
  margin-bottom: 25px;
}

.personal-info-title{
  margin-top: 0;
}

label {
  display: block;
  margin-bottom: 5px; /* Reducido de 10px a 5px */
  font-weight: normal;
  color: var(--secondary-color);
  font-size: 0.9rem; /* Reducido */
}

select, button, input[type=text], input[type=email], input[type=tel] {
  width: 100%;
  padding: 8px; /* Reducido de 10px a 8px */
  font-size: 0.85rem; /* Reducido de 0.95rem a 0.85rem */
  border: 1px solid var(--border-color);
  border-radius: 4px; /* Reducido de 5px a 4px */
  box-sizing: border-box;
  transition: border-color 0.3s;
}

select:focus {
  border-color: var(--poliglota-green);
  outline: none;
}

.objectives {
  display: flex;
  flex-wrap: wrap;
  gap: 8px; /* Reducido de 10px a 8px */
}

.objective-btn {
  flex: 1 1 40%; /* Reducido de 45% a 40% */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px; /* Reducido de 10px a 8px */
  border: 1.5px solid var(--poliglota-green); /* Reducido de 2px a 1.5px */
  border-radius: 6px; /* Reducido de 8px a 6px */
  background-color: var(--white);
  color: var(--poliglota-green);
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s, transform 0.2s;
  font-size: 0.85rem; /* Reducido */
}

.objective-btn i {
  margin-right: 4px; /* Reducido de 6px a 4px */
  font-size: 1rem; /* Reducido de 1.1rem a 1rem */
}

.objective-btn.selected {
  background-color: var(--poliglota-green);
  color: var(--white);
  transform: scale(1.03); /* Reducido de 1.05 a 1.03 */
}

.objective-btn:hover {
  background-color: var(--poliglota-green);
  color: var(--white);
}

/* Slider Container */
.slider-container {
  width: 100%;
  margin: 8px 0; /* Reducido de 10px a 8px */
}

/* Slider Styles */
.slider-container input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px; /* Grosor del track */
  cursor: pointer;
  margin: 0; /* Eliminar márgenes */
}

/* Track para navegadores WebKit */
.slider-container input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px; /* Grosor del track */
    border-radius: 3px;
}

/* Track para navegadores Mozilla */
.slider-container input[type=range]::-moz-range-track {
    width: 100%;
    height: 6px; /* Grosor del track */
    border-radius: 3px;
}

/* Progress para navegadores WebKit */
.slider-container input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px; /* Ancho del thumb */
    height: 16px; /* Alto del thumb */
    background: #ffffff; /* Range-Thumb Blanco */
    border: 2px solid var(--poliglota-green); /* Contorno Verde */
    border-radius: 50%;
    cursor: pointer;
    margin-top: -5px; /* Centrar verticalmente el thumb */
    box-shadow: 0 0 5px rgba(25, 165, 114, 0.5); /* Sombra verde */
    transition: background 0.3s, transform 0.2s;
}

/* Progress para navegadores Mozilla */
.slider-container input[type=range]::-moz-range-thumb {
    width: 16px; /* Ancho del thumb */
    height: 16px; /* Alto del thumb */
    background: #ffffff; /* Range-Thumb Blanco */
    border: 2px solid var(--poliglota-green); /* Contorno Verde */
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(25, 165, 114, 0.5); /* Sombra verde */
    transition: background 0.3s, transform 0.2s;
}

/* Hover para el thumb */
.slider-container input[type=range]::-webkit-slider-thumb:hover,
.slider-container input[type=range]::-moz-range-thumb:hover {
    transform: scale(1.1); /* Agrandar ligeramente */
}

canvas {
  width: 100% !important;
  max-height: 350px; /* Reducido de 400px a 350px */
  border-radius: 6px; /* Reducido de 8px a 6px */
}

.result-subtitle {
  font-size: 0.9rem;
  color: var(--secondary-color);
  margin: 0;
  margin-bottom: 5px;
  font-weight: 700;
}

.result-title {
  font-size: 1.4rem; /* Reducido de 1.2rem a 1rem */
  color: var(--poliglota-green);
  margin: 0;
  font-weight: 900;
  margin-bottom: 20px;
}

.result {
  padding: 10px; /* Reducido de 15px a 10px */
  background-color: #e9ffe9;
  border: 1px solid #b2ffb2;
  border-radius: 4px; /* Reducido de 5px a 4px */
  display: block; /* Ahora siempre visible */
  margin-right:20px;
  max-width: 600px;
  width: 100%;
}

.result ul {
  list-style: none;
  padding-left: 0;
  color: var(--secondary-color);
  font-size: 0.85rem; /* Reducido */
  margin: 5px;
}

.result ul li {
  margin-bottom: 4px; /* Reducido de 6px a 4px */
  display: flex;
  align-items: center;
  gap: 4px; /* Reducido de 6px a 4px */
}

.result ul li i {
  color: var(--poliglota-green);
  font-size: 0.9rem; /* Reducido */
}

.dedication-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: normal;
}

.dedication-labels .low {
  text-align: left;
}

.dedication-labels .high {
  text-align: right;
}

#dedication-description-container {
  margin-top: 10px;
  font-size: 0.8rem;
  color: #555;
  font-style: italic;
}

.results-info a, .results-info i {
  text-decoration: none;
  color: #555;
  font-size: 0.7rem;
}

.results-info{
  text-align: right;
  margin-bottom: 10px;
}

.results-info a:hover {
  text-decoration: underline;
}

/* Estilo del contenedor del popup */
.popup {
  display: none; /* Oculto por defecto */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1002;
  background-color: white;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  max-width: 500px;
  width: 80%;
  padding: 20px;
  text-align: center;
}

/* Contenido del popup */
.popup-content {
  position: relative;
  font-size:0.9rem;
}

/* Botón de cierre */
.close {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 0.9rem;
  cursor: pointer;
  color: #888;
}

.close:hover {
  color: #000;
}

.navigation-links {
  margin-top: 20px;
  text-align: center;
}

.navigation-links a,
.navigation-links button {
  padding: 10px 20px;
  margin: 5px;
  text-decoration: none;
  color: #19a572;
  font-size: 16px;
  border: none;
  background: none;
  cursor: pointer;
}

.navigation-links a:hover {
  text-decoration: underline;
}

.navigation-links button {
  background-color: #19a572;
  color: white;
  border-radius: 5px;
}

.navigation-links button:hover {
  background-color: #147a4e;
}

#end-btn{
  padding: 10px 20px;
  margin: 5px;
  text-decoration: none;
  font-size: 16px;
  border: none;
  background-color: var(--poliglota-green);
  color: white;
  border-radius: 5px;
  cursor: pointer;
}

#end-btn:hover {
  background-color: #147a4e;
}

#prev-btn {
  background-color: transparent;
  color: var(--poliglota-green);
  border: 2px solid var(--poliglota-green);
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
}

#prev-btn:hover {
  background-color: var(--poliglota-green);
  color: white;
}

.step-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-bottom: 20px;
}

.dot {
  width: 5px;
  height: 5px;
  background-color: white;
  border: 1px solid var(--poliglota-green);
  border-radius: 50%;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.dot.active {
  background-color: var(--poliglota-green);
  transform: scale(1.2);
}


#step-4{
  align-self:center;
}

.navbar {
  background-color: var(--white); /* Fondo blanco */
  color: var(--secondary-color); /* Texto en gris oscuro */
  padding: 5px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 0 9px 2px #00000047; /* Sombra sutil */
  border-bottom: 1px solid var(--border-color); /* Línea delgada opcional */
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.navbar-logo {
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--white);
}

.navbar-menu a {
  color: var(--secondary-color); /* Color de los enlaces */
  transition: color 0.3s;
}

.navbar-menu a:hover {
  color: var(--poliglota-green); /* Color verde Poliglota en hover */
}

.navbar-menu li {
  display: inline;
}

.navbar-menu a {
  text-decoration: none;
  color: var(--white);
  font-size: 1rem;
  transition: color 0.3s;
}

.navbar-logo-image {
  height: 40px; /* Ajusta la altura según sea necesario */
  max-height: 50px;
  object-fit: contain; /* Asegura que no se deforme */
  vertical-align: middle;
}

.rocket {
  position: absolute;
  bottom: -100px; /* Empieza fuera de la pantalla */
  left: -100px;  /* Empieza fuera de la pantalla */
  font-size: 100px; /* Tamaño base */
  animation: fly 2s linear 1; /* Animación más rápida y solo una vez */
  z-index: 1001;
}

.final-message{
  font-size: 0.9rem; /* Reducido */
}

.image-container {
  display: flex;
  justify-content: center; /* Centra horizontalmente */
  align-items: center; /* Centra verticalmente si hay altura */
  height: 300px; /* Altura del contenedor */
  background-color: #f7f7f7; /* Fondo para visualizar mejor */
}

.fixed-size-image {
  width: 300px;
  height: 300px;
  object-fit: cover;
  border-radius: 8px; /* Opcional: esquinas redondeadas */
}

@keyframes fly {
  0% {
    transform: translate(0, 0); /* Posición inicial */
  }
  100% {
    transform: translate(100vw, -100vh); /* Cruza la pantalla */
  }
}

@media(max-width: 768px) {

  .options-panel, .chart-result {
    flex: 1 1 100%;
  }

  .objective-btn {
    flex: 1 1 100%;
  }

  .slider-container {
    flex-direction: column;
    align-items: flex-start;
  }

}

@media (max-width: 576px) {
  .chart-result {
    width: 340px;
    flex-direction: column;
    padding: 10px;
  }

  .small-hidden{
    display: none;
  }
}