/* --- SECCIÓN TEST DE VELOCIDAD --- */
.seccion-test {
  display: flex;
  width: 100%;
  min-height: 550px; /* Altura mínima para que el iframe tenga buen espacio */
  scroll-margin-top: 120px;
}

/* Lado izquierdo (Texto) */
.test-mitad-texto {
  flex: 1; /* Ocupa el 50% del ancho */
  background-color: var(--bg, #000000);
  color: var(--secundary-text-color, #ffffff);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4rem 5%;
  border-radius: 0% 15% 15% 0%;
}

.test-contenido {
  text-align: center;
  max-width: 900px;
}

.test-contenido h2 {
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 2rem;
  letter-spacing: -1px;
}

.test-contenido .resaltado {
  color: var(--primario);
}

.test-contenido p {
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.5;
}

/* Lado derecho (Iframe) */
.test-mitad-iframe {
  flex: 1; /* Ocupa el otro 50% */
  background-color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

/* Contenedor que limita y protege el tamaño de tu iframe */
.iframe-wrapper {
  width: 100%;
  max-width: 500px;
  height: 100%;
  min-height: 450px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Regla para que el iframe que pegues se adapte automáticamente al contenedor */
.iframe-wrapper iframe {
  width: 100%;
  height: 100%;
  min-height: 450px; /* Asegura que no se corte el test de Ookla u otros */
  border: none;
  border-radius: 12px; /* Opcional: suaviza los bordes del test si lo permite */
  transform: scale(1.5);
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 1024px) {
  .test-contenido h2 {
    font-size: 3.5rem;
  }
}

@media (max-width: 768px) {
  .seccion-test {
    flex-direction: column; /* Apila los elementos verticalmente en móviles */
  }

  .test-mitad-texto {
    padding: 5rem 5%;
  }

  .test-contenido h2 {
    font-size: 3rem;
  }

  .test-mitad-iframe {
    padding: 3rem 1rem;
    min-height: 500px; /* Garantiza que el widget tenga espacio suficiente al apilarse */
  }
}
