/* Paleta de colores naranjas */
:root {
  --primary: #e65100;
  --secondary: #ff7043;
  --tertiary: #ffab91;
  --dark: #3e2723;
  --light: #fff3e0;
  --fondo: #fcfcfc;
  --borde: #ff8a65;
}

/* ============================================================
   RESET BÁSICO Y TIPOGRAFÍA GLOBAL
   ============================================================ */

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--light);
  color: var(--dark);
  margin: 0;
}

/* Contenedores principales con estilos unificados */
.card {
  max-width: 1100px;
  margin: 16px auto;
  padding: 20px;
  background-color: var(--fondo);
  border-radius: 12px;
  border: 1px solid var(--borde);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ============================================================
   ESTILOS GENERALES
   ============================================================ */

h1 {
  font-size: 2.2em;
  color: var(--primary);
  margin: 0;
}

h2, h3, h4 {
  color: var(--dark);
  border-bottom: 2px solid var(--borde);
  padding-bottom: 8px;
}

p {
  line-height: 1.6;
}

strong {
  color: var(--primary);
}

.no-margin {
  margin: 0;
}

.espacio-arriba {
  margin-top: 30px;
}

.espacio-arriba-sm {
  margin-top: 16px;
}

.aviso {
  background-color: var(--light);
  border-left: 4px solid var(--primary);
  padding: 15px 20px;
  border-radius: 8px;
  margin: 20px 0;
}

.nota {
  background-color: var(--light);
  border-left: 4px solid var(--secondary);
  padding: 10px 15px;
  border-radius: 8px;
  margin-top: 15px;
  font-style: italic;
  font-size: 0.9em;
  color: var(--dark);
}

pre {
  background-color: var(--dark);
  color: var(--light);
  padding: 18px 24px;
  border-radius: 10px;
  font-size: 0.95em;
  overflow-x: auto;
  margin: 20px 0;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

code {
  font-family: 'Fira Mono', 'Consolas', monospace;
  font-size: 1em;
}

ul {
  padding-left: 20px;
  line-height: 1.5;
}

/* ============================================================
   NAVEGACIÓN
   ============================================================ */

nav {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 20px;
}

nav a {
  color: var(--dark);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  background-color: var(--tertiary);
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
}

nav a:hover {
  background-color: var(--primary);
  color: #fff;
}

/* ============================================================
   PLAYGROUNDS
   ============================================================ */

.play {
  background-color: #f8f8f8;
  padding: 20px;
  border-radius: 12px;
  border: 1px dashed var(--borde);
  margin-top: 24px;
}

.controles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.controles label {
  font-size: 0.9em;
  color: var(--dark);
}

.demo-box {
  border: 2px solid var(--primary);
  background-color: #fff;
  height: 120px;
  border-radius: 8px;
  margin-top: 10px;
}

.box {
  background-color: var(--secondary);
  color: #fff;
  padding: 16px;
  border-radius: 6px;
  text-align: center;
  font-weight: bold;
  font-size: 1.2em;
}

.grid-chuleta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.subtitulo {
  font-weight: bold;
  margin: 0 0 6px;
  color: var(--dark);
}

.grid-chuleta li {
  font-size: 0.95em;
  margin-bottom: 4px;
}
/* Estilos generales para el bloque de ejercicio */
.bloque-ejercicio {
  background-color: #fafafa;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
  text-align: center;
}

/* Estilo para el botón de enlace */
.boton-enlace {
  display: inline-block;
  background-color: #e44d26;
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 12px 24px;
  border-radius: 8px;
  margin-top: 15px;
  transition: background-color 0.3s ease;
}

/* Efecto al pasar el mouse por encima */
.boton-enlace:hover {
  background-color: #f16529;
}

/* ============================================================
   FOOTER
   ============================================================ */

footer {
  text-align: center;
  font-size: 0.9em;
  color: #777;
  padding: 12px;
}

footer small {
  display: block;
  margin-top: 5px;
}