/* --- CSS Optimizado y Minificable --- */
:root {
    --primary: #2c3e50; /* Azul oscuro profesional */
    --accent: #e67e22;  /* Naranja para llamadas a la acción */
    --text: #333;
    --bg: #f4f7f6;
    --white: #fff;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; line-height: 1.6; color: var(--text); background-color: var(--bg); padding: 20px; }

/* Contenedor principal para no ocupar todo el ancho en PC grandes */
.container { max-width: 1000px; margin: 0 auto; }

/* Header y Navegación */
header { background: var(--primary); color: var(--white); padding: 40px 20px; text-align: center; border-radius: 8px; margin-bottom: 30px; }
header h1 { font-size: 2.5rem; margin-bottom: 10px; }
header p { opacity: 0.8; font-size: 1.1rem; }

/* Portada: Rejilla de errores (Grid) */
.grid-errores { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-bottom: 40px; }
.card { background: var(--white); padding: 25px; border-radius: 8px; box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s; border: 1px solid #eee; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-5px); box-shadow: 0 6px 12px rgba(0,0,0,0.15); }
.card h3 { color: var(--primary); margin-bottom: 10px; font-size: 1.4rem; }
.card p { color: #666; font-size: 0.95rem; margin-bottom: 20px; flex-grow: 1; }
.card .btn { align-self: flex-start; }

/* Botones universales */
.btn { display: inline-block; padding: 12px 24px; background-color: var(--accent); color: var(--white); text-decoration: none; border-radius: 4px; font-weight: bold; transition: background 0.2s; border: none; cursor: pointer; }
.btn:hover { background-color: #d35400; }
.btn-secondary { background-color: #3498db; }
.btn-secondary:hover { background-color: #2980b9; }

/* Artículos: Estilos de contenido */
article { background: var(--white); padding: 40px; border-radius: 8px; box-shadow: var(--shadow); }
article h1 { color: var(--primary); font-size: 2.2rem; margin-bottom: 15px; border-bottom: 3px solid var(--accent); display: inline-block; padding-bottom: 5px; }
article h2 { color: var(--primary); margin: 30px 0 15px 0; font-size: 1.6rem; }
article p { margin-bottom: 15px; font-size: 1.1rem; color: #444; }
article strong { color: #000; }
article ol, article ul { margin-left: 20px; margin-bottom: 20px; font-size: 1.1rem; }
article li { margin-bottom: 10px; }

/* Cajas de Alerta/Solución Rápida */
.box-highlight { background-color: #e8f4fd; border-left: 5px solid #3498db; padding: 20px; border-radius: 4px; margin: 25px 0; }
.box-warning { background-color: #fff3cd; border-left: 5px solid #ffc107; padding: 20px; border-radius: 4px; margin: 25px 0; color: #856404; }

/* Imágenes optimizadas */
article img { max-width: 100%; height: auto; border-radius: 4px; margin: 20px 0; box-shadow: 0 2px 4px rgba(0,0,0,0.1); border: 1px solid #eee; }

/* Breadcrumbs (Migas de pan) para SEO */
.breadcrumbs { font-size: 0.9rem; margin-bottom: 20px; color: #777; }
.breadcrumbs a { color: #3498db; text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

/* Footer y Relacionados */
.relacionados { margin-top: 50px; padding-top: 30px; border-top: 2px dashed #ccc; }
.relacionados h3 { margin-bottom: 20px; color: var(--primary); }
footer { text-align: center; margin-top: 50px; padding: 30px; color: #777; font-size: 0.9rem; border-top: 1px solid #eee; }
footer a { color: #777; margin: 0 10px; text-decoration: none; }

/* Marcadores AdSense (Ligeros) */
.adsense-placeholder { background: #fafafa; border: 1px dashed #ddd; padding: 20px; text-align: center; color: #999; font-style: italic; margin: 20px 0; border-radius: 4px; }

/* Responsive Media Queries */
@media (max-width: 600px) {
    body { padding: 10px; }
    header h1 { font-size: 1.8rem; }
    article { padding: 20px; }
    article h1 { font-size: 1.6rem; }
}