.wp-nuclear-body {
font-family: ‘Segoe UI’, Roboto, Helvetica, Arial, sans-serif;
background-color: #0f172a;
color: #f8fafc;
padding: 40px 10px;
display: flex;
flex-direction: column;
align-items: center;
border-radius: 15px;
}
.wp-nuclear-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 10px;
max-width: 650px;
width: 100%;
}
.wp-nuclear-item {
background-color: #1e293b;
border: 1px solid #334155;
border-radius: 8px;
aspect-ratio: 1 / 1;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
font-size: 0.8rem;
padding: 10px;
cursor: pointer;
transition: all 0.2s ease;
}
.wp-nuclear-item:hover {
border-color: #22c55e;
background-color: #1e2e45;
transform: scale(1.02);
}
.wp-nuclear-empty {
background-color: rgba(255, 255, 255, 0.05);
border: 1px dashed #334155;
border-radius: 8px;
aspect-ratio: 1 / 1;
cursor: pointer;
}
/* Modal / Ventana Emergente */
#wp-nuclear-modal {
display: none;
position: fixed;
z-index: 99999;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.9);
justify-content: center;
align-items: center;
}
#wp-nuclear-modal img {
max-width: 85%;
max-height: 85%;
border: 5px solid white;
border-radius: 10px;
box-shadow: 0 0 30px rgba(0,0,0,0.5);
}
@media (max-width: 500px) {
.wp-nuclear-grid { grid-template-columns: repeat(2, 1fr); }
}
(function() {
const mensajes = [
«Con las nucleares ganamos todxs», «Apoya las renovables», «Es fiable»,
«Es segura», «Es limpia y no emite CO2», «Es barata»,
«Nos da independencia energética», «El problema de los residuos está solucionado»,
«Los pequeños reactores modulares son el futuro», «Hay muchos proyectos nuevos»,
«La sociedad española es pro nuclear»
];
const container = document.getElementById(‘nuclear-grid-container’);
const modal = document.getElementById(‘wp-nuclear-modal’);
// 11 mensajes + 5 vacíos
let celdas = […mensajes, …Array(5).fill(null)];
celdas.forEach(texto => {
const div = document.createElement(‘div’);
if (texto) {
div.className = ‘wp-nuclear-item’;
div.innerText = texto;
} else {
div.className = ‘wp-nuclear-empty’;
}
div.onclick = () => { modal.style.display = ‘flex’; };
container.appendChild(div);
});
})();
Bingo sobre Energía Nuclear
Haz clic para volver